commit 29f250d8f2a60b88ebd7a0ddd01f50772ce91180
parent f7c1c05ad475ea3bbbc9e7a24f693a56f49a103e
Author: Jaromil <jaromil@dyne.org>
Date: Sat, 20 Aug 2011 19:00:10 +0200
fix: on -k - , wipe temp file
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/tomb b/src/tomb
@@ -758,6 +758,7 @@ mount_tomb() {
# set up variables to be used
# the full path is made with $tombdir/$tombfile
+
local tombkey
local tombfile
local tombdir
@@ -865,6 +866,12 @@ mount_tomb() {
rmdir $tombkeydir
fi
+ # if key was from stdin delete temp file and dir
+ if [ $tombkeydir ]; then
+ ${WIPE[@]} ${tombkey}
+ rmdir $tombkeydir
+ fi
+
if [ -r /dev/mapper/${mapper} ]; then
break; # password was correct
fi