[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Re: [Patch] Wallet support for KMail
From:       Volker Krause <volker.krause () rwth-aachen ! de>
Date:       2004-08-31 14:54:06
Message-ID: 200408311654.06685.volker.krause () rwth-aachen ! de
[Download RAW message or body]

On Tuesday 31 August 2004 11:08, Stephan Kulow wrote:
> Am Montag 30 August 2004 19:05 schrieb Volker Krause:
> > If password storage is disabled, KMail should only access the wallet if
> > it already contains the password and delete it (checking if a key exists
> > should work without opening the wallet).
>
> Afaik there are bugs left in kwallet about that hashing. George promised to
> fix these for KDE 3.3.1, so I hope he does.

There seems to be indeed a problem with KWallet and its keyDoesNotExist() 
call. After creating a new entry you need to close and reopen the wallet to 
get a correct result of keyDoesNotExist(). The attached shell script 
demonstrates this.

Considering this I was able to reproduce the migration problems reported here 
and on kde-cvs. You can work around them by manually closing the wallet and 
restarting KMail. The passwords are correctly stored in the wallet (at least 
after the bugfix for SMTP account migration from a few hours ago), KMail is 
just not able to see them.

Regarding Stephan's bug: I'm still not able to reproduce it, and the 
keyDoesNotExist() problem should actually cause exactly the opposite, i.e. 
not removing existing keys. 

regards
Volker

["wallet-bug.sh" (application/x-shellscript)]

#!/bin/sh

walletname=`dcop kded kwalletd networkWallet`
walletid=`dcop kded kwalletd open $walletname 0`

dcop kded kwalletd createFolder $walletid testfolder

if [ "`dcop kded kwalletd folderDoesNotExist $walletname testfolder`" = "true" ]; then
	echo "ERROR: Folder exists"
else
	echo "OK"
fi

dcop kded kwalletd writePassword $walletid testfolder key value

if [ `dcop kded kwalletd keyDoesNotExist $walletname testfolder key` = "true" ]; then
	echo "ERROR: Key exists"
else
	echo "OK"
fi

# closing only this wallet handle doesn't help, need to close all
#dcop kded kwalletd close $walletid
dcop kded kwalletd closeAllWallets 

if [ `dcop kded kwalletd folderDoesNotExist $walletname testfolder` = "true" ]; then
        echo "ERROR: Folder exists"
else
        echo "OK"
fi

if [ `dcop kded kwalletd keyDoesNotExist $walletname testfolder key` = "true" ]; then
	echo "ERROR: Key exists"
else
	echo "OK"
fi


_______________________________________________
KMail developers mailing list
KMail-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmail-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic