ports/169235: x11/kde4-runtime: kioslave sftp login error with keyboard-interactive authentication

Arrigo Marchiori ardovm at yahoo.it
Tue Jun 19 07:20:14 UTC 2012


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



More information about the freebsd-ports-bugs mailing list