tsafe_dir supports mktemp - tomb - the crypto undertaker HTML git clone git://parazyd.org/tomb.git DIR Log DIR Files DIR Refs DIR README DIR LICENSE --- DIR commit 1594b2c8256aebf5a85b6f7c445ed68c7ab150f8 DIR parent 0095a89d4d4ee01f6859ae04c951c8af1f1ac6f9 HTML Author: boyska <piuttosto@logorroici.org> Date: Thu, 28 Apr 2011 23:48:37 +0200 safe_dir supports mktemp if available, use it. otherwise, keep using our hack Diffstat: M src/tomb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) --- DIR diff --git a/src/tomb b/src/tomb t@@ -84,6 +84,11 @@ check_bin() { # safe dir creation function safe_dir() { + try mktemp + if [[ $? = 0 ]]; then + mktemp -d /dev/shm/$1.XXXX.$$ + return + fi dir="/dev/shm/$1.$RANDOM.$RANDOM.$$" (umask 077 && mkdir "$dir") || echo "-1" echo "$dir" t@@ -298,7 +303,7 @@ create_tomb() { act "Generating secret key..." act "this operation takes time, keep using this computer on other tasks," act "once done you will be asked to choose a password for your tomb." - act "To make it faster you can move the mouse" + act "To make it faster you can move the mouse around" touch ${keytmp}/tomb.tmp chmod 0600 ${keytmp}/tomb.tmp if [[ $DD = "dcfldd" ]]; then