tcorrectly set ownership to user on newly created tombs - tomb - the crypto undertaker HTML git clone git://parazyd.org/tomb.git DIR Log DIR Files DIR Refs DIR README DIR LICENSE --- DIR commit 130c98f1fe72a117b3a9247d138c932dea572c82 DIR parent 41738e762671b1114fe9a1e40bd0aae924801827 HTML Author: Jaromil <jaromil@dyne.org> Date: Tue, 24 May 2011 11:17:33 +0200 correctly set ownership to user on newly created tombs Diffstat: M src/tomb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- DIR diff --git a/src/tomb b/src/tomb t@@ -441,8 +441,9 @@ create_tomb() { losetup -d ${nstloop} # set permissions on the tomb - sudo chown $UID:$GID ${tombfile} - sudo chmod 600 ${tombfile} + ME=${SUDO_USER:-$(whoami)} + chmod 0600 ${tombfile} + chown $(id -u $ME):$(id -g $ME) ${tombfile} act "done creating $tombname encrypted storage (using Luks dm-crypt AES/SHA256)" notice "Your tomb is ready in ${tombdir}/${tombfile} and secured with key ${tombfile}.key"