From: Silvio Rhatto Date: Tue, 26 Nov 2013 14:26:33 +0000 (-0200) Subject: Better mode check on keyringer_check_tmp (closes #30) X-Git-Tag: 0.2.9~9 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=ef014f585c83958488f8349feba9c3eefbf2f419;p=keyringer.git Better mode check on keyringer_check_tmp (closes #30) --- diff --git a/lib/keyringer/functions b/lib/keyringer/functions index 8bad9ed..667b0cd 100755 --- a/lib/keyringer/functions +++ b/lib/keyringer/functions @@ -115,14 +115,9 @@ function keyringer_is_git { function keyringer_check_tmp { local path="$1" local major - local mode - - if [ -z "$path" ]; then - return - fi # Mode check - if [ "`stat -c "%A" $path`" != "drwxrwxrwt" ]; then + if [ -z "$path" ] || [ ! -d "$path" ] || [ ! -w "$path" ] || [ ! -x "$path" ]; then return 1 fi