### 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 3 Jun 2009 21:08:24 -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 3 Jun 2009 21:08:22 -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.107.2.1
diff -u -r1.107.2.1 CVSRepositoryLocation.java
--- src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java 4 Aug 2008 09:23:59 -0000 1.107.2.1
+++ src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java 3 Jun 2009 21:08:25 -0000
@@ -783,6 +783,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);
@@ -1306,4 +1310,16 @@
return null; // invalid path
}
}
+
+ 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/CVSProjectSetCapability.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProjectSetCapability.java,v
retrieving revision 1.24
diff -u -r1.24 CVSProjectSetCapability.java
--- src/org/eclipse/team/internal/ccvs/core/CVSProjectSetCapability.java 5 Jun 2008 17:46:45 -0000 1.24
+++ src/org/eclipse/team/internal/ccvs/core/CVSProjectSetCapability.java 3 Jun 2009 21:08:22 -0000
@@ -618,7 +618,8 @@
private static final String EXTSSH = "extssh"; //$NON-NLS-1$
private static final String PSERVER = "pserver"; //$NON-NLS-1$
- private static final String EXT = "ext"; //$NON-NLS-1$
+ private static final String EXT = "ext"; //$NON-NLS-1$
+ private static final String SSPI = "sspi"; //$NON-NLS-1$
/**
* Checks whether a dialog prompting for an addition repository location is
@@ -747,10 +748,14 @@
return -1;
if (name2.equals(PSERVER))
return 1;
- if (name1.equals(EXT))
- return -1;
- if (name2.equals(EXT))
- return 1;
+ if (name1.equals(EXT))
+ return -1;
+ if (name2.equals(EXT))
+ return 1;
+ if (name1.equals(SSPI))
+ return -1;
+ if (name2.equals(SSPI))
+ return 1;
}
return name1.compareTo(name2);
}
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,22 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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.IConnectionMethod;
+
+public class SSPIConnectionMethod extends ExtConnectionMethod {
+ /**
+ * @see IConnectionMethod#getName
+ */
+ public String getName() {
+ return "sspi"; //$NON-NLS-1$
+ }
+}