From 7a8a8666bab53270fda2c666136810b718e415e5 Mon Sep 17 00:00:00 2001 From: Jaromil Date: Wed, 26 Nov 2014 17:24:11 +0100 Subject: [PATCH] addressing comments on last commit with a few fixes --- tomb | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/tomb b/tomb index fdc3111..76524e9 100755 --- a/tomb +++ b/tomb @@ -234,10 +234,9 @@ _plot() { # Provide a random filename in shared memory _tmp_create() { [[ -d "$TMPPREFIX" ]] || { - sudo mkdir -m 777 "$TMPPREFIX" - [[ $? == 0 ]] || _failure "Fatal error creating the temporary directory: ::1 temp dir::" "$TMPPREFIX" # we create the tempdir with the sticky bit on - sudo chmod o+t "$TMPPREFIX" + sudo mkdir -m 1777 "$TMPPREFIX" + [[ $? == 0 ]] || _failure "Fatal error creating the temporary directory: ::1 temp dir::" "$TMPPREFIX" } # We're going to add one more $RANDOM for each time someone complain @@ -339,20 +338,20 @@ ask_password() { local description="$1" local title="${2:-Enter tomb password.}" - local _output - local _password - local _gtkrc - local _theme + local output + local password + local gtkrc + local theme [[ "$DISPLAY" = "" ]] || { - _theme=/share/themes/tomb/gtk-2.0-key/gtkrc + theme=/share/themes/tomb/gtk-2.0-key/gtkrc for i in /usr/local /usr; do - [[ -r $i/$_theme ]] && { - _gtkrc=$i/$_theme + [[ -r $i/$theme ]] && { + gtkrc=$i/$theme break } done } - _output=`cat <