Bug 161931

Summary: When disk space runs out, files are silently truncated when decrypting
Product: [Applications] kgpg Reporter: Travis Evans <travisgevans>
Component: generalAssignee: Rolf Eike Beer <kde>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Travis Evans 2008-05-11 04:05:30 UTC
Version:            (using KDE 3.5.8)
Installed from:    Debian testing/unstable Packages

When I am decrypting a symmetrically-encrypted file with KGPG and the filesystem I'm decrypting to runs out of space, KGPG silently ignores the problem and pretends to be working, meanwhile either truncating the decrypted file or leaving it at 0 bytes. It displays absolutely NO error or warning whatsoever. I just wasted a lot of time today thinking that I was decrypting a bunch of very large files, when nothing was getting done because the partition had unexpectedly run out of space.

I do get an error from KGPG when attempting to encrypt a file to a filesystem with insufficient space, but not when I'm decrypting it. gpg from the command line does display an error when decrypting when this happens and exits with code 2, so there is no reason for KGPG not to be able to detect this error.
Comment 1 Rolf Eike Beer 2008-05-26 12:28:50 UTC
SVN commit 812751 by dakon:

Improve the signaling on decryption process exit

-fix memleak by deleting the interface class
-fix wrong connection
-check the process' exit status
-clean up and better document the return values

CCBUG:161931


 M  +3 -2      kgpglibrary.cpp  
 M  +1 -1      kgpglibrary.h  
 M  +11 -5     kgpgtextinterface.cpp  
 M  +12 -7     kgpgtextinterface.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=812751
Comment 2 Rolf Eike Beer 2008-06-19 08:13:58 UTC
SVN commit 822095 by dakon:

Rework file decryption

If the decryption fails the filenames of those files are shown. The error 
message given in this case is not perfect, but because we are in string 
freeze I reused one that already existed.

Before this for every file to decrypt one KgpgLibrary object was created and 
never deleted again. Now only one object is created for every decryption job 
(which may contain several files at once) and afterwards is properly destroyed.

BUG:161931


 M  +37 -25    kgpg.cpp  
 M  +5 -1      kgpg.h  
 M  +4 -1      kgpglibrary.cpp  
 M  +1 -1      kgpglibrary.h  
 M  +12 -2     kgpgtextinterface.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=822095