From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Jun 19 07:20:14 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE6171065678 for ; Tue, 19 Jun 2012 07:20:14 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 96FED8FC18 for ; Tue, 19 Jun 2012 07:20:14 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q5J7KEtP074701 for ; Tue, 19 Jun 2012 07:20:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q5J7KEWs074700; Tue, 19 Jun 2012 07:20:14 GMT (envelope-from gnats) Resent-Date: Tue, 19 Jun 2012 07:20:14 GMT Resent-Message-Id: <201206190720.q5J7KEWs074700@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Arrigo Marchiori Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 929EC1065674 for ; Tue, 19 Jun 2012 07:11:11 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 74B728FC1C for ; Tue, 19 Jun 2012 07:11:11 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q5J7BBSV010191 for ; Tue, 19 Jun 2012 07:11:11 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q5J7BBEr010189; Tue, 19 Jun 2012 07:11:11 GMT (envelope-from nobody) Message-Id: <201206190711.q5J7BBEr010189@red.freebsd.org> Date: Tue, 19 Jun 2012 07:11:11 GMT From: Arrigo Marchiori To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/169235: x11/kde4-runtime: kioslave sftp login error with keyboard-interactive authentication X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2012 07:20:14 -0000 >Number: 169235 >Category: ports >Synopsis: x11/kde4-runtime: kioslave sftp login error with keyboard-interactive authentication >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jun 19 07:20:14 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Arrigo Marchiori >Release: 7-STABLE >Organization: >Environment: % uname -r 7.4-STABLE % pkg_info | grep kde-runtime kde-runtime-4.8.4 Basic applications for the KDE system >Description: The sftp kioslave does not connect to hosts that require keyboard-interactive authentication. A password is requested to the user, but that password is not used for the connection. Result: all login attempts fail. This bug was reported upstream: https://bugs.kde.org/show_bug.cgi?id=299993 A patch is reported there, that can be applied out-of-the-box to the KDE sources from the port. >How-To-Repeat: Open Dolphin. Try to connect to any host using the syntax sftp://username@host. Enter the password in the dialog and see the login fail. Try to connect to the same host using the syntax sftp://username:password@host. The connection will be successful. >Fix: The quickest fix, IMHO, would be to integrate the patch reported to upstream into the x11/kde4-runtime port. The "longest" fix is waiting for upstream to integrate that patch in the next KDE version. Attached to this bug is the "revised" patch by Jonathan Thomas. Patch attached with submission follows: --- kio_sftp.cpp 2012-04-29 22:38:49.000000000 +0200 +++ kio_sftp.cpp.new 2012-06-08 10:48:45.000000000 +0200 @@ -239,7 +239,7 @@ for (i = 0; i < n; ++i) { char echo; - const char *answer = ""; + QByteArray answer; prompt = QString::fromUtf8(ssh_userauth_kbdint_getprompt(mSession, i, &echo)); kDebug(KIO_SFTP_DB) << "prompt=" << prompt << " echo=" << QString::number(echo); @@ -272,10 +272,10 @@ if (openPasswordDialog(infoKbdInt, i18n("Use the username input field to answer this question."))) { kDebug(KIO_SFTP_DB) << "Got the answer from the password dialog"; - answer = info.username.toUtf8().constData(); + answer = info.username.toUtf8(); } - if (ssh_userauth_kbdint_setanswer(mSession, i, answer) < 0) { + if (ssh_userauth_kbdint_setanswer(mSession, i, answer.constData()) < 0) { kDebug(KIO_SFTP_DB) << "An error occurred setting the answer: " << ssh_get_error(mSession); return SSH_AUTH_ERROR; @@ -283,18 +283,18 @@ break; } else { if (prompt.contains("Password", Qt::CaseInsensitive)) { - answer = mPassword.toUtf8().constData(); + answer = info.password.toUtf8(); } else { info.readOnly = true; // set username readonly info.prompt = prompt; if (openPasswordDialog(info)) { kDebug(KIO_SFTP_DB) << "Got the answer from the password dialog"; - answer = info.password.toUtf8().constData(); + answer = info.password.toUtf8(); } } - if (ssh_userauth_kbdint_setanswer(mSession, i, answer) < 0) { + if (ssh_userauth_kbdint_setanswer(mSession, i, answer.constData()) < 0) { kDebug(KIO_SFTP_DB) << "An error occurred setting the answer: " << ssh_get_error(mSession); return SSH_AUTH_ERROR; >Release-Note: >Audit-Trail: >Unformatted: