tomb

the crypto undertaker
git clone git://parazyd.org/tomb.git
Log | Files | Refs | README | LICENSE

commit 10baee25a6217d7b6cd80f28e0533d7d615f346e
parent 99914051241e551f16a77af58273541158ec6fdf
Author: Jaromil <jaromil@dyne.org>
Date:   Mon, 13 Jan 2014 00:17:24 +0100

Resize now appends directly to tomb file

this avoids creating a delta file in ram, filling it eventually.
fixes #99

Diffstat:
Mtomb | 14+++-----------
1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/tomb b/tomb @@ -1969,7 +1969,6 @@ resize_tomb() { { test -r "$tombkey" } || { die "Aborting operations: key not found, use -k" } - local tmp_resize=`safe_filename resize` local oldtombsize=$(( `stat -c %s "$1" 2>/dev/null` / 1048576 )) local mounted_tomb=`mount -l | awk -vtomb="[$tombname]" '/^\/dev\/mapper\/tomb/ { if($7==tomb) print $1 }'` @@ -1991,17 +1990,10 @@ resize_tomb() { act "Generating ${tombfile} of ${newtombsize}MiB" xxx "Data dump using ${DD[1]} from /dev/urandom" - ${=DD} if=/dev/urandom bs=1048576 count=${delta} of="${tmp_resize}" - - if [ $? = 0 -a -e "${tmp_resize}" ]; then - xxx "OK: `ls -lh ${tmp_resize}`" - else - _failure "Error creating the extra resize $tmp_resize, operation aborted." - fi - - cat "${tmp_resize}" >> ${tombdir}/${tombfile} - rm "${tmp_resize}" + ${=DD} if=/dev/urandom bs=1048576 count=${delta} >> ${tombdir}/${tombfile} + { test $? = 0 } || { + _failure "Error creating the extra resize $tmp_resize, operation aborted." } tombpass=`ask_key_password $tombkey` { test $? = 0 } || {