Bug 387056 - ksshaskpass should wait for KWallet authentication
Summary: ksshaskpass should wait for KWallet authentication
Status: REPORTED
Alias: None
Product: ksshaskpass
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Jeremy Whiting
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-18 05:30 UTC by Shriramana Sharma
Modified: 2021-12-19 17:13 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot showing dialogs for ksshaskpass when one for KWallet is still pending (33.40 KB, image/png)
2017-11-18 05:30 UTC, Shriramana Sharma
Details
Script to setup ksshaskpass to be used upon bash startup (1.02 KB, application/x-shellscript)
2017-11-18 05:31 UTC, Shriramana Sharma
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shriramana Sharma 2017-11-18 05:30:30 UTC
Created attachment 108938 [details]
Screenshot showing dialogs for ksshaskpass when one for KWallet is still pending

I have been using a script (see attachment) source-d in my .bashrc to setup ssh-agent and ksshaskpass to retrieve my SSH password from KWallet.

Since I use Yakuake, a shell is started up immediately at KDE session login. This calls up ksshaskpass which then sends a request to KWallet, I presume via DBus. However, perhaps this request times out too soon or something even before the Plasma desktop loads because I always see both the KWallet password prompt and the ksshaskpass prompt (see attachment) and my started Yakuake shell reads:

Initialising new SSH agent on host desktop... Succeeded
Pass a valid window to KWallet::Wallet::openWallet().
The kwalletd service has been registered
Invalid DBus reply:  QDBusError("org.freedesktop.DBus.Error.NoReply", "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.")
QDBusConnection: name 'org.kde.kwalletd5' had owner '' but we thought it was ':1.49'

Entering the KWallet password at this point is no longer useful to provide the SSH password and I always have to enter that separately for ksshaskpass or dismiss that dialog so it fails for now and will gets the password later from KWallet at the next SSH attempt or such.

This behaviour is quite infelicitous. ksshaskpass should sufficiently wait for KWallet to return the required password. The only possible current workaround for this is to remove the KWallet password which is of course not advisable.

I see some similar bugs with other programs impatient to wait for KWallet, and https://bugs.kde.org/show_bug.cgi?id=154131#c6 seems to indicate a solution might be to set a sufficiently high timeout for the DBus request.

I'm using Kubuntu Xenial LTS with latest updates. Relevant versions:

ksshaskpass 4:5.5.5-0ubuntu1
kwalletmanager  4:15.12.3-0ubuntu1
libkwalletbackend5-5:amd64      5.18.0a-0ubuntu1
libpam-kwallet4 4:5.5.5-0ubuntu1
libpam-kwallet5 4:5.5.5-0ubuntu1
signon-kwallet-extension        4:15.12.3-0ubuntu1

Please fix this. Thanks!
Comment 1 Shriramana Sharma 2017-11-18 05:31:07 UTC
Created attachment 108939 [details]
Script to setup ksshaskpass to be used upon bash startup