From unknown Wed Apr 29 13:07:12 2026
X-Loop: owner@bugs.x2go.org
Subject: Bug#420: Fix password connection with libssh 0.6.0
Reply-To: Orion Poplawski <orion@cora.nwra.com>, 420@bugs.x2go.org
Resent-From: Orion Poplawski <orion@cora.nwra.com>
Resent-To: x2go-dev@lists.berlios.de
Resent-CC: X2Go Developers <x2go-dev@lists.berlios.de>
X-Loop: owner@bugs.x2go.org
Resent-Date: Wed, 29 Jan 2014 16:45:01 +0000
Resent-Message-ID: <handler.420.B.139101383631554@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: report 420
X-X2Go-PR-Package: x2goclient
X-X2Go-PR-Keywords: patch
Received: via spool by submit@bugs.x2go.org id=B.139101383631554
          (code B); Wed, 29 Jan 2014 16:45:01 +0000
Received: (at submit) by bugs.x2go.org; 29 Jan 2014 16:43:56 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID
	autolearn=ham version=3.3.2
Received: from mail.cora.nwra.com (mercury.cora.nwra.com [4.28.99.165])
	by ymir (Postfix) with ESMTPS id A0F975DA6C
	for <submit@bugs.x2go.org>; Wed, 29 Jan 2014 17:43:54 +0100 (CET)
Received: from [10.10.20.7] (barry.cora.nwra.com [10.10.20.7])
	(authenticated bits=0)
	by mail.cora.nwra.com (8.14.4/8.14.4) with ESMTP id s0TGhpsV025209
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO)
	for <submit@bugs.x2go.org>; Wed, 29 Jan 2014 09:43:52 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cora.nwra.com;
	s=default; t=1391013832;
	bh=CquVIJX7g49sNVpwAeOVKfJHxPppcBBM3p0Qf0zLr5E=;
	h=Message-ID:Date:From:MIME-Version:To:Subject:Content-Type;
	b=QDU/9CrvN4K+2PZgyRpmUhN9MAlvOir9s1Eu1g+iRskOIaltA8BfxA5V0LTUeYV4x
	 FGW1lQJYHe7jCFHWruoG2Dizs1ToRmlJc8XWABuZQmXgfpS434Ou/Dh0syufQOGZt5
	 EZERyg9pNXiXQOmEeSbQLttgMQagL3Xg7ID+Ps+8=
Message-ID: <52E92FC7.5070603@cora.nwra.com>
Date: Wed, 29 Jan 2014 09:43:51 -0700
From: Orion Poplawski <orion@cora.nwra.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
MIME-Version: 1.0
To: submit@bugs.x2go.org
X-Enigmail-Version: 1.6
Content-Type: multipart/mixed;
 boundary="------------060200060405040107000300"

This is a multi-part message in MIME format.
--------------060200060405040107000300
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

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                       orion@nwra.com
Boulder, CO 80301                   http://www.nwra.com

--------------060200060405040107000300
Content-Type: text/x-patch;
 name="x2goclient-sshauth.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="x2goclient-sshauth.patch"

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)

--------------060200060405040107000300--
