[X2Go-Commits] [x2goclient] 02/02: src/sshmasterconnection.cpp: don't output an empty error message if password authencation has been requested but the server does not support this mechanism.

git-admin at x2go.org git-admin at x2go.org
Tue Nov 14 00:07:38 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 7d52367b3678df74fea53343486ba420683bb75d
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Mon Nov 13 22:34:38 2017 +0100

    src/sshmasterconnection.cpp: don't output an empty error message if password authencation has been requested but the server does not support this mechanism.
---
 debian/changelog            | 3 +++
 src/sshmasterconnection.cpp | 7 +++++++
 2 files changed, 10 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 68dbcb2..79d3915 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -29,6 +29,9 @@ x2goclient (4.1.1.1-0x2go1) UNRELEASED; urgency=medium
       directly.
     - src/sshmasterconnection.cpp: error out with a useful error message in
       case no password has been provided when doing password authentication.
+    - src/sshmasterconnection.cpp: don't output an empty error message if
+      password authencation has been requested but the server does not support
+      this mechanism.
 
   [ Oleksandr Shneyder ]
   * New upstream version (4.1.1.1):
diff --git a/src/sshmasterconnection.cpp b/src/sshmasterconnection.cpp
index 9635aa2..be327c6 100644
--- a/src/sshmasterconnection.cpp
+++ b/src/sshmasterconnection.cpp
@@ -1305,6 +1305,13 @@ bool SshMasterConnection::userAuthWithPass()
         }
     }
 
+    if ((!ret) && (method & ~SSH_AUTH_METHOD_PASSWORD)) {
+        /* In case password auth is disabled, make sure the error message is not empty. */
+        QString err = ssh_get_error (my_ssh_session);
+        authErrors << err;
+        x2goDebug << "Password authentication not available: " << err << endl;
+    }
+
     return (ret);
 }
 

--
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