Review Request 120388: Do not sync if wallet file does not exist

Arjun AK arjunak234 at gmail.com
Mon Dec 29 12:58:18 UTC 2014



> On Dec. 29, 2014, 3:58 a.m., David Faure wrote:
> > low-level review: no need to create a QFile, use QFile::exists(path)
> > 
> > higher-level review: ensuring that a file exists before calling KSaveFile, which *creates* the file, sounds weird. I mean, isn't this exactly what will happen the very first time a wallet is created? (disclaimer - I don't know this code so I'm probably missing context).

>low-level review: no need to create a QFile, use QFile::exists(path)

Ok

>higher-level review: ensuring that a file exists before calling KSaveFile, which creates the file, sounds weird. I mean, isn't this exactly what will happen the very first time a wallet is created? (disclaimer - I don't know this code so I'm probably missing context).

If we delete the kwallet directory we would loose both the kwl as well as salt files. Now if we were to call sync, kwl file gets written to disk and user can continue to add data to the wallet untill he closes it, after which he no longer would be able to access it since he doesn't have the salt file with him. Any data that was added to the wallet in the meantime would be lost forever.


- Arjun


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120388/#review72634
-----------------------------------------------------------


On Dec. 11, 2014, 7:46 a.m., Arjun AK wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120388/
> -----------------------------------------------------------
> 
> (Updated Dec. 11, 2014, 7:46 a.m.)
> 
> 
> Review request for KDE Frameworks, Àlex Fiestas, Teo Mrnjavac, and Valentin Rusu.
> 
> 
> Repository: kwallet
> 
> 
> Description
> -------
> 
> 1. Create a new wallet "foo"
> 2. immediately remove the 'kwalletd5' directory
> 3. `KWalletD::timedOutSync()` will call sync on a nonexistant wallet (which will create "foo.kwl")
> 
> Kwalletmanager still lists the wallet and new data can be added to the wallet, but this data will be lost once the wallet is closed since the salt has been deleted and therefore the wallet cannot be opened again.
> 
> 
> Diffs
> -----
> 
>   src/runtime/kwalletd/backend/kwalletbackend.cc b072cec 
> 
> Diff: https://git.reviewboard.kde.org/r/120388/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Arjun AK
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20141229/5029b864/attachment.html>


More information about the Kde-frameworks-devel mailing list