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

List:       kde-core-devel
Subject:    Re: File corruption with KSaveFile on full disk
From:       Sebastian Sauer <mail () dipe ! org>
Date:       2009-01-17 22:53:48
Message-ID: 200901172353.48475.mail () dipe ! org
[Download RAW message or body]

Michael Leupold wrote:

> Hi,
> 
> I received a bugreport about someone loosing his wallet today. Basically a
> process filled his disk while the wallet was open. On closing it something
> went terribly wrong and he ended up with a kdewallet.kwl with size 0.
> 
> I'm pretty much stuck because I couldn't reproduce myself but I assumed
> this couldn't happen as kwalletd's backend uses KSaveFile to make sure
> either the whole wallet gets saved or nothing. As KSaveFile seems to be
> currently unmaintained I hope someone of you knows if it's supposed to
> handle full disk and if there's a corner case where this might indeed lead
> to corruption.
> 
> The bugreport is: http://bugs.kde.org/show_bug.cgi?id=181059
> 
> Thanks and regards,
> Michael

in the method Backend::sync() in kwalletbackend.cc shouldn't the returnvalues 
of the sf.write() be checked? else the sf.write() may fail, we ignore it and 
then finalize the empty file...
[prev in list] [next in list] [prev in thread] [next in thread] 

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