[Bug 1772990] [NEW] Race condition when opening kwallet on login

Alexander Lochmann 1772990 at bugs.launchpad.net
Wed May 23 18:47:06 UTC 2018


Public bug reported:

Description:    Ubuntu 18.04 LTS
Release:        18.04
kde-runtime:
  Installed: 4:17.08.3-0ubuntu1
  Candidate: 4:17.08.3-0ubuntu1
  Version table:
 *** 4:17.08.3-0ubuntu1 500
        500 http://de.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
        100 /var/lib/dpkg/status
Setup:
My login password is the same as the password for my default kwallet (kdewallet).
Hence, kde will automatically open it on login.
I added a script to ~/.config/autostart-scripts/ which loads my ssh key using ksshaskpass.

What I expect to happen:
1) KDE/SDDM (or whatever) opens my default kwallet
2) KDE executes my autostart script which in my case loads my ssh keys. This happens without prompting neither for the kwallet password nor for the passphrase.

What does happen:
It looks like KDE executes step 1) and 2) in parallel. Step 2) is faster than 1) which blocks all remaining accesses to my wallet, e.g., Network-Manager connecting to my wifi.
Moreover, step 2) prompts for my kwallet password.
If I abort that prompt, the kwallet won't be opened at all. It seems that step 1) is not executed.

If I add the following snippet to my addkeys.sh script, everything works as expected:
DEFAULT_WALLET="kdewallet"
IS_OPEN_CMD="qdbus org.kde.kwalletd /modules/kwalletd org.kde.KWallet.isOpen"

while [ `${IS_OPEN_CMD} ${DEFAULT_WALLET}` == "false" ];
do
        sleep 1
done

This code delays the loading of my ssh key until the kwallet is opened
correctly.

** Affects: kde-runtime (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to kde-runtime in Ubuntu.
https://bugs.launchpad.net/bugs/1772990

Title:
  Race condition when opening kwallet on login

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/kde-runtime/+bug/1772990/+subscriptions




More information about the kubuntu-bugs mailing list