[Pkg-privacy-commits] [libgsecuredelete] 122/168: sfill wrapper: always launch the real `sfill`

Ulrike Uhlig u-guest at moszumanska.debian.org
Thu Jul 7 20:06:46 UTC 2016


This is an automated email from the git hooks/post-receive script.

u-guest pushed a commit to branch master
in repository libgsecuredelete.

commit 9abb854da7a6895fae6180a3a02ca57ef7f277f5
Author: Colomban Wendling <ban at herbesfolles.org>
Date:   Sun Jun 3 16:28:09 2012 +0200

    sfill wrapper: always launch the real `sfill`
    
    Previously, `sfill` was only used to wipe INode space; free space was
    only wiped by creating big files and using `srm` to remove them.
    
    Now, always call `sfill` at some point in case it does something more
    sophisticated.  To still workaround the file size issue, `sfill` is run
    after having crated big files, and before removing them.
---
 gsd-sfill-helper.in | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/gsd-sfill-helper.in b/gsd-sfill-helper.in
index b73d6f5..ce9edec 100644
--- a/gsd-sfill-helper.in
+++ b/gsd-sfill-helper.in
@@ -105,16 +105,7 @@ trap "rm -rf '$dir'" EXIT
 trap cleanup INT QUIT TERM
 
 
-# wipe inodes, no workaround needed
-if [ -n "$OPT_i" ] || [ -z "$OPT_I" ]; then
-  # don't report progress if we're also gonna wipe disk space
-  inode_v=$OPT_v
-  [ -z $OPT_i ] && inode_v=
-  
-  launch_cmd "$SFILL" $OPT_f -i $OPT_l $inode_v $OPT_z "$dir"
-fi
-
-# wipe disk space, work around for file size limit
+# fill disk space, workaround for file size limit
 if [ -z "$OPT_i" ]; then
   input=/dev/zero
   [ -r "$input" ] || die "$input is not readable"
@@ -131,7 +122,16 @@ if [ -z "$OPT_i" ]; then
   done
   sync
   progress_step
-  
+fi
+
+# launch sfill as wanted, now there is not much free space
+sfill_v=$OPT_v
+# don't report progress if we're also filling disk space
+[ -z "$OPT_i" ] && sfill_v=
+launch_cmd "$SFILL" $OPT_f $OPT_i $OPT_I $OPT_l $sfill_v $OPT_z "$dir"
+
+# and finally securely remove temporary files created earlier
+if [ -z "$OPT_i" ]; then
   launch_cmd "$SRM" -r $OPT_f $OPT_l $OPT_z "$dir"
   
   progress_step

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/libgsecuredelete.git



More information about the Pkg-privacy-commits mailing list