Bug 361373

Summary: KWallet fails to unlock after logout/login cycle
Product: [Frameworks and Libraries] frameworks-kwallet Reporter: madcatx
Component: generalAssignee: Valentin Rusu <valir>
Status: REPORTED ---    
Severity: normal CC: bjoernv, kdelibs-bugs-null
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description madcatx 2016-04-04 12:21:56 UTC
I use kwallet-pam to unlock my wallet automatically after I login. This works fine only the first time I log in. If I have to log out of my session and log back in, KWallet asks me to enter a password. Even when I provide the correct password to the GUI prompts, the wallet fails to unlock with "error -9". The only way to get into the wallet again is to reboot the system.

I've done a bit of investigation on my own hoping that it'd be something simple. As far as I can tell the password hash used to decrypt the storage is correct first time after the reboot. Any subsequent unlocks will use a different hash that fails to decrypt the storage. The wrong hash stays the same each time I try the logout/login cycle. I also noticed that the wrong hash seems to be change after a reboot.

Reproducible: Always

Steps to Reproduce:
1. Log into Plasma after boot and have kwallet-pam enabled
2. Log out and back in
3. Done. KWallet cannot be opened until next reboot

Actual Results:  
KWallet is not opened and cannot be opened until the system is rebooted.

Expected Results:  
KWallet should be opened by pam automatically or at least be openalbe after the correct password is provided to the GUI prompt.

I'm currently using KWallet 5.20 and kwallet-pam 5.6.1 as packaged by Arch Linux.