Subject: Bug#420: Fix password connection with libssh 0.6.0

From: Orion Poplawski <[email-masked]>
Date: Wed, 29 Jan 2014 09:43:51 -0700

Package: x2goclient
Version: 4.0.1.3
Tags: patch

Starting with libssh 0.6.0, ssh_userauth_list() no longer automatically calls
ssh_userauth_none() if needed (auth_methods == 0) to populate the list of
methods available.  This patch calls it explicitly.  An alternative would be
to simply try authenticating.

Without this, attempts to connect with a password fails with an empty
"Authentication failed" error window.

-- 
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA, Boulder/CoRA Office             FAX: 303-415-9702
3380 Mitchell Lane                       [email-masked]
Boulder, CO 80301                   http://www.nwra.com
diff -up x2goclient-4.0.1.3/sshmasterconnection.cpp.sshauth x2goclient-4.0.1.3/sshmasterconnection.cpp
--- x2goclient-4.0.1.3/sshmasterconnection.cpp.sshauth	2014-01-29 08:52:44.564013247 -0700
+++ x2goclient-4.0.1.3/sshmasterconnection.cpp	2014-01-29 09:32:31.963139911 -0700
@@ -924,6 +924,9 @@ bool SshMasterConnection::userChallengeA
 
 bool SshMasterConnection::userAuthWithPass()
 {
+    // Populate the userauth_list
+    ssh_userauth_none(my_ssh_session, NULL);
+
     int method = ssh_userauth_list(my_ssh_session, NULL);
 
     if (method& SSH_AUTH_METHOD_INTERACTIVE)

---

From: Mike Gabriel <[email-masked]>
Date: Wed, 29 Jan 2014 20:19:25 +0000

Hi Alex,

> "Authentication failed" error window.

Can you verify the submitted patch against X2Go Client and apply to  
release/4.0.1.x branch of X2Go Client.

Please let me if I then shall cherry-pick the same patch onto the  
master branch (with the new rev tunnel code already applied) or if it  
needs a different fix or no fix at all for the master branch.

Thanks,
Mike
-- 

DAS-NETZWERKTEAM
mike gabriel, herweg 7, 24357 fleckeby
fon: +49 (1520) 1976 148

GnuPG Key ID 0x25771B31
mail: [email-masked], http://das-netzwerkteam.de

freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb