### Eclipse Workspace Patch 1.0 #P org.eclipse.team.cvs.core Index: src/org/eclipse/team/internal/ccvs/core/client/Session.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java,v retrieving revision 1.103 diff -u -r1.103 Session.java --- src/org/eclipse/team/internal/ccvs/core/client/Session.java 16 Mar 2007 21:03:49 -0000 1.103 +++ src/org/eclipse/team/internal/ccvs/core/client/Session.java 15 Jun 2008 13:31:09 -0000 @@ -198,6 +198,10 @@ Command.VERSION.execute(this, location, Policy.subMonitorFor(monitor, 10)); } opened = true; + } catch (CVSException e) { + getLocationForConnection(false).inspectCVSException(e); + + throw e; } finally { if (connection != null && ! opened) { close(); Index: plugin.xml =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.team.cvs.core/plugin.xml,v retrieving revision 1.55 diff -u -r1.55 plugin.xml --- plugin.xml 13 Mar 2007 16:26:13 -0000 1.55 +++ plugin.xml 15 Jun 2008 13:31:09 -0000 @@ -35,6 +35,19 @@ + + + + + + + + Index: src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java,v retrieving revision 1.100 diff -u -r1.100 CVSRepositoryLocation.java --- src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java 16 Mar 2007 21:03:49 -0000 1.100 +++ src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java 15 Jun 2008 13:31:09 -0000 @@ -758,6 +758,10 @@ monitor.beginTask(NLS.bind(CVSMessages.CVSRepositoryLocation_openingConnection, new String[] { getHost() }), 2); ensureLocationCached(); boolean cacheNeedsUpdate = false; + // If the password is null the user probably didn't want to store it, but in case of sspi via extnt make sure that the user is prompted for it + if ((password == null) && ("sspi".equals(method.getName()) || "ext".equals(method.getName()))) { + previousAuthenticationFailed = true; + } // If the previous connection failed, prompt before attempting to connect if (previousAuthenticationFailed) { promptForUserInfo(null); @@ -1231,4 +1235,16 @@ } return false; } + + public void inspectCVSException(CVSException cvsException) throws CVSAuthenticationException { + if ("sspi".equals(method.getName()) || "ext".equals(method.getName())) { + IStatus status = cvsException.getStatus(); + + if ((status.getMessage().indexOf("connect aborted") > -1) && (status.getMessage().indexOf("ed access to") > -1)) { + previousAuthenticationFailed = true; + + throw new CVSAuthenticationException(status.getMessage(), CVSAuthenticationException.RETRY, this, null); + } + } + } } Index: src/org/eclipse/team/internal/ccvs/core/connection/SSPIConnectionMethod.java =================================================================== RCS file: src/org/eclipse/team/internal/ccvs/core/connection/SSPIConnectionMethod.java diff -N src/org/eclipse/team/internal/ccvs/core/connection/SSPIConnectionMethod.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/org/eclipse/team/internal/ccvs/core/connection/SSPIConnectionMethod.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright (c) 2000, 2006 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.team.internal.ccvs.core.connection; + + +import org.eclipse.team.internal.ccvs.core.*; + +public class SSPIConnectionMethod extends ExtConnectionMethod { + /** + * @see IConnectionMethod#getName + */ + public String getName() { + return "sspi"; //$NON-NLS-1$ + } +}