[X2Go-Commits] [x2goclient] 01/05: sshmasterconnection.cpp: let challenge-auth-based login attempts fallback to normal password authentication if the initial challenge-auth-based attempt was unsuccessful.
git-admin at x2go.org
git-admin at x2go.org
Fri Jan 29 00:58:11 CET 2016
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2goclient.
commit 5c1e4373afa6af9017b5a6a312a6cec962125fc3
Author: Mihai Moldovan <ionic at ionic.de>
Date: Fri Jan 29 00:37:03 2016 +0100
sshmasterconnection.cpp: let challenge-auth-based login attempts fallback to normal password authentication if the initial challenge-auth-based attempt was unsuccessful.
---
debian/changelog | 3 +++
src/sshmasterconnection.cpp | 21 ++++++++++++++++-----
2 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index d8d113a..879a379 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -28,6 +28,9 @@ x2goclient (4.0.5.1-0x2go1) UNRELEASED; urgency=low
- onmainwindow.cpp: use lowercase version of locale. Fixes: #953.
Fixes loading up the nb_NO translation file, which is actually baked as
nb_no into the binary.
+ - sshmasterconnection.cpp: let challenge-auth-based login attempts
+ fallback to normal password authentication if the initial
+ challenge-auth-based attempt was unsuccessful.
* debian/control:
- Change apache2-dev | libc6-dev build dependency back to apache2-dev
only. Otherwise, apache2-dev is not installed at all, even though
diff --git a/src/sshmasterconnection.cpp b/src/sshmasterconnection.cpp
index 82e7cca..942b374 100644
--- a/src/sshmasterconnection.cpp
+++ b/src/sshmasterconnection.cpp
@@ -946,6 +946,8 @@ bool SshMasterConnection::userChallengeAuth()
bool SshMasterConnection::userAuthWithPass()
{
+ bool ret = false;
+
// Populate the userauth_list
ssh_userauth_none(my_ssh_session, NULL);
@@ -957,11 +959,19 @@ bool SshMasterConnection::userAuthWithPass()
x2goDebug<<"Challenge authentication requested."<<endl;
#endif
challengeAuthPasswordAccepted=false;
- return userChallengeAuth();
+ ret = userChallengeAuth();
+ }
+
+ if (!ret) {
+ x2goDebug << "Challenge authentication failed. Trying password mechanism if available." << endl;
}
- if (method & SSH_AUTH_METHOD_PASSWORD)
+ if ((!ret) && (method & SSH_AUTH_METHOD_PASSWORD))
{
+ if (!ret) {
+ x2goDebug << "Password mechanism available. Continuing." << endl;
+ }
+
#ifdef DEBUG
x2goDebug<<"Password authentication requested."<<endl;
#endif
@@ -973,12 +983,13 @@ bool SshMasterConnection::userAuthWithPass()
#ifdef DEBUG
x2goDebug<<"userAuthWithPass failed:" <<err<<endl;
#endif
- return false;
}
- return true;
+ else {
+ ret = true;
+ }
}
- return false;
+ 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