--nextPart1515266.vp1WGyN3M7 Content-Type: multipart/alternative; boundary="Boundary-00=_xfncJ7ooZkrtcUI" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-00=_xfncJ7ooZkrtcUI Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable On Saturday 17 January 2009, Sebastian Sauer wrote: > 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=3D181059 > > > > 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... Yeah, that certainly seems possible (and every single sf.write() needs to b= e=20 checked no less). Hard to say if this is the case for the bug reporter but= =20 just as RAID doesn't save you from rm -rf /, KSaveFile doesn't save you fro= m=20 trying to finalize() and empty file. Regards, - Michael Pyne --Boundary-00=_xfncJ7ooZkrtcUI Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 7bit On Saturday 17 January 2009, Sebastian Sauer wrote:
> 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...


Yeah, that certainly seems possible (and every single sf.write() needs to be checked no less). Hard to say if this is the case for the bug reporter but just as RAID doesn't save you from rm -rf /, KSaveFile doesn't save you from trying to finalize() and empty file.


Regards,
- Michael Pyne

--Boundary-00=_xfncJ7ooZkrtcUI-- --nextPart1515266.vp1WGyN3M7 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEABECAAYFAklyd/EACgkQqjQYp5Omm0rsHwCgiJU7BY980VmT0E4D42x4fZmB YyAAn3CEsMU8D4DGtAfIxA3JTqGovy72 =Eh6k -----END PGP SIGNATURE----- --nextPart1515266.vp1WGyN3M7--