]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
shell: Only use ~/tmp if it's owned by the current user.
authorSimon Ruderich <simon@ruderich.org>
Sun, 17 Jan 2010 15:07:16 +0000 (16:07 +0100)
committerSimon Ruderich <simon@ruderich.org>
Sun, 17 Jan 2010 15:07:16 +0000 (16:07 +0100)
shell/env

index 3395e4beb034b84567b9182bbaa6d5608ccd5bb3..e0e2a899b1d5ef184c0878bf62d0155b13f7bc96 100644 (file)
--- a/shell/env
+++ b/shell/env
@@ -34,7 +34,7 @@ export PAGER
 
 # Use ~/tmp as directory for temporary files if available to reduce security
 # problems on multi-user systems.
-if [ -d ~/tmp ]; then
+if [ -O ~/tmp -a -d ~/tmp ]; then
     TMP=~/tmp
     TMPDIR=$TMP
     export TMP TMPDIR