[X2Go-Commits] [x2goclient] 01/06: src/sshmasterconnection.cpp: don't ask for private key passphrase if auto-login merely failed due to the server denying the public key.

git-admin at x2go.org git-admin at x2go.org
Fri Nov 10 23:09:17 CET 2017


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2goclient.

commit a7abd15be8be6bcd7d68b47deac3c3120b1ae9d4
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Fri Nov 10 20:40:00 2017 +0100

    src/sshmasterconnection.cpp: don't ask for private key passphrase if auto-login merely failed due to the server denying the public key.
---
 debian/changelog            | 2 ++
 src/sshmasterconnection.cpp | 8 +++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 9385408..91f6478 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ x2goclient (4.1.1.1-0x2go1) UNRELEASED; urgency=medium
     - macbuild.sh: also bundle xauth binary as nxauth binary.
     - macbuild.sh: switch to bundling PulseAudio 11.1 since it's now available
       in MacPorts.
+    - src/sshmasterconnection.cpp: don't ask for private key passphrase if
+      auto-login merely failed due to the server denying the public key.
 
   [ Oleksandr Shneyder ]
   * Change echo mode for user input in InteractionDialog.
diff --git a/src/sshmasterconnection.cpp b/src/sshmasterconnection.cpp
index d62485a..6ccf099 100644
--- a/src/sshmasterconnection.cpp
+++ b/src/sshmasterconnection.cpp
@@ -1296,6 +1296,12 @@ bool SshMasterConnection::userAuthAuto()
     int i=0;
     while(rc != SSH_AUTH_SUCCESS)
     {
+        if (SSH_AUTH_DENIED == rc) {
+          /* No need to continue, all keys have been rejected by the server. */
+          break;
+        }
+
+        /* This section should only be executed if rc is SSH_AUTH_ERROR. */
         keyPhraseReady=false;
         emit needPassPhrase(this, false);
         for(;;)
@@ -1323,7 +1329,7 @@ bool SshMasterConnection::userAuthAuto()
         QString err=ssh_get_error ( my_ssh_session );
         authErrors<<err;
 #ifdef DEBUG
-        x2goDebug<<"userAuthAuto failed:" <<err<<endl;
+        x2goDebug << "userAuthAuto failed:" << err << " (code " << rc << ")" << endl;
 #endif
         return false;
     }

--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git


More information about the x2go-commits mailing list