Bug 152162 - IO-slaves not working with authentication
Summary: IO-slaves not working with authentication
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-11 09:27 UTC by Luca Beltrame
Modified: 2007-11-18 21:35 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Beltrame 2007-11-11 09:27:07 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          g++ (GCC) 4.1.3 
OS:                Linux

KIO slaves such as fish, smb and ftp do not work when there is authentication involved, while they are OK when no auth info is required.

Steps to reproduce:

SMB

1. Locate a samba share which requires user authentication
2. Point to it in Konqueror or Dolphin
3. Insert credentials at the password prompt

Expected result:

Browsing the share

Actual result: 

Dolphin or Konqueror report an internal error. Relevant console output is added below
kio_smb(13234) SMBSlave::listDir: SMBSlave::listDir open  "smb://SAMBASERVER/lb"   3   -1
kio_smb(13234) SMBSlave::checkPassword: checkPassword for  KUrl("smb://SAMBASERVER/lb")
kio_smb(13234) SMBSlave::checkPassword: call openPasswordDialog for  KUrl("smb://SAMBASERVER/lb")
kio_smb(13234)/kio (kioslave) KIO::SlaveBase::openPasswordDialog: SlaveBase::openPasswordDialog window-id= 60817467
kded(13205)/kio (KPasswdServer) KPasswdServer::queryAuthInfo: KPasswdServer::queryAuthInfo: User=  "" , Message=  "Please enter authentication information for:
Server = SAMBASERVER
Share = lb" , WindowId =  60817467
kded(13205)/kio (KPasswdServer) KPasswdServer::processRequest: KPasswdServer::processRequest: User=  "" , Message=  "Please enter authentication information for:
Server = SAMBASERVER
Share = lb"
kded(13205)/kio (KPasswdServer) KPasswdServer::addAuthInfoItem: Creating AuthInfo
kio_smb(13234) SMBSlave::checkPassword: no value from openPasswordDialog
kio_smb(13234) SMBSlave::reportError: reportError  KUrl("smb://SAMBASERVER/lb")   "Resource temporarily unavailable"
dolphin(13184)/kio (KIOJob) KIO::SlaveInterface::dispatch: error  104   "Unknown error condition in stat: Resource temporarily unavailable"
dolphin(13184)/kio (KDirListerCache) KDirListerCache::slotResult: finished listing KUrl("smb://SAMBASERVER/lb")

(I've replaced the actual server name with SAMBASERVER)

FTP

Steps are the same as above, however the console output is slightly different:
kio_ftp(13409)/kio (kioslave) KIO::SlaveBase::openPasswordDialog: SlaveBase::openPasswordDialog window-id= 60817467
kded(13205)/kio (KPasswdServer) KPasswdServer::queryAuthInfo: KPasswdServer::queryAuthInfo: User=  "" , Message=  "You need to supply a username and a password to access this site." , WindowId =  60817467
kded(13205)/kio (KPasswdServer) KPasswdServer::processRequest: KPasswdServer::processRequest: User=  "" , Message=  "You need to supply a username and a password to access this site."
kded(13205)/kio (KPasswdServer) KPasswdServer::addAuthInfoItem: Creating AuthInfo
dolphin(13184)/kio (KIOJob) KIO::SlaveInterface::dispatch: error  1   "FTPSERVER"
dolphin(13184)/kio (KDirListerCache) KDirListerCache::slotResult: finished listing KUrl("ftp://FTPSERVER")

SSH
Same as above, with this output:
fish(13549)/kio_fish fishProtocol::connectionStart: 399 :  Exec:  /usr/bin/ssh  Port:  0  User:  "kde-devel"
fish(13549)/kio_fish fishProtocol::establishConnection: 549 :  establishing: got  "kde-devel@SSH_SERVER's password:"
fish(13549)/kio_fish fishProtocol::establishConnection: 590 :  sending mpass
fish(13549)/kio (kioslave) KIO::SlaveBase::checkCachedAuthentication: SlaveBase::checkCachedAuthInfo window =  60817467  url =  "fish://kde-devel@SSH_SERVER"
kded(13205)/kio (KPasswdServer) KPasswdServer::checkAuthInfo: KPasswdServer::checkAuthInfo: User=  "kde-devel" , WindowId =  60817467
fish(13549)/kio (kioslave) KIO::SlaveBase::openPasswordDialog: SlaveBase::openPasswordDialog window-id= 60817467
kded(13205)/kio (KPasswdServer) KPasswdServer::queryAuthInfo: KPasswdServer::queryAuthInfo: User=  "kde-devel" , Message=  "kde-devel@SSH_SERVER's password:" , WindowId =  60817467
kded(13205)/kio (KPasswdServer) KPasswdServer::processRequest: KPasswdServer::processRequest: User=  "kde-devel" , Message=  "kde-devel@SSH_SERVER's password:"
kded(13205)/kio (KPasswdServer) KPasswdServer::addAuthInfoItem: Creating AuthInfo
fish(13549)/kio_fish fishProtocol::error: 1341 :  ERROR:  1  -  "SSH_SERVER"

This happens with self-compiled KDE as of yesterday (10th November 2007)
Comment 1 Jakub Stachowski 2007-11-18 18:05:07 UTC
authInfo was not passed back from authentication dialog to slave. Fixed.
Comment 2 Luca Beltrame 2007-11-18 21:35:44 UTC
Works for FTP and SMB. When using fish:/ it still fails, but with different output:

fish(21628)/kio_fish fishProtocol::establishConnection: 590 :  sending mpass
fish(21628)/kio (kioslave) KIO::SlaveBase::checkCachedAuthentication: SlaveBase::checkCachedAuthInfo window =  60817470  url =  "fish://USER@SSH_SERVER"
fish(21628)/kio (kioslave) KIO::SlaveBase::checkCachedAuthentication: Can't communicate with kded_kpasswdserver (for checkAuthInfo)!
fish(21628)/kio (kioslave) KIO::SlaveBase::checkCachedAuthentication: "Not connected to D-BUS server"
fish(21628)/kio (kioslave) KIO::SlaveBase::openPasswordDialog: SlaveBase::openPasswordDialog window-id= 60817470
fish(21628)/kio (kioslave) KIO::SlaveBase::openPasswordDialog: Can't communicate with kded_kpasswdserver (for queryAuthInfo)!
fish(21628)/kio (kioslave) KIO::SlaveBase::openPasswordDialog: ""
fish(21628)/kio_fish fishProtocol::error: 1341 :  ERROR:  1  -  "SSH_SERVER"

If it is a separate issue, I will file another bug.