Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2003-08-12 11:03:03 -0400
committerJean Michel-Lemieux2003-08-12 11:03:03 -0400
commitfad1c3fe5958551b2fc3be375bd8997868263d25 (patch)
tree22879facf0f26401f59b8ff000e9dda3380c4205
parent069f46691d2da550fb014744a5abf69f5cca8189 (diff)
downloadeclipse.platform.team-fad1c3fe5958551b2fc3be375bd8997868263d25.tar.gz
eclipse.platform.team-fad1c3fe5958551b2fc3be375bd8997868263d25.tar.xz
eclipse.platform.team-fad1c3fe5958551b2fc3be375bd8997868263d25.zip
Bug 41161 [Sync View] Can cause CVS client to lock SSH account due to invalid password attempsRoot_ConcurrentCommandsBranch
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java
index fd40bbe32..cfcfc08d9 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java
@@ -39,6 +39,7 @@ import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
import org.eclipse.team.internal.ccvs.core.CVSStatus;
import org.eclipse.team.internal.ccvs.core.CVSTag;
import org.eclipse.team.internal.ccvs.core.ICVSFolder;
+
import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile;
import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
@@ -97,6 +98,7 @@ public class CVSRepositoryLocation extends PlatformObject implements ICVSReposit
private String root;
private boolean userFixed;
private boolean passwordFixed;
+
private int serverPlatform = UNDETERMINED_PLATFORM;
private String remoteCVSProgramName = DEFAULT_REMOTE_CVS_PROGRAM_NAME;
@@ -326,8 +328,15 @@ public class CVSRepositoryLocation extends PlatformObject implements ICVSReposit
* use the plugged-in authenticator to prompt for the username and/or
* password if one has not previously been provided or if the previously
* supplied username and password are invalid.
- */
- public Connection openConnection(IProgressMonitor monitor) throws CVSException {
+ *
+ * This method is synchronized to ensure that authentication with the
+ * remote server is serialized. This is needed to avoid the situation where
+ * multiple failed authentications occur and result in the remote account
+ * being locked. The CVSProviderPlugin enforces that there is one instance
+ * of a CVSRepositoryLocation per remote location thus this method is called
+ * for any connection made to this remote location.
+ */
+ public synchronized Connection openConnection(IProgressMonitor monitor) throws CVSException {
try {
// Allow two ticks in case of a retry

Back to the top