]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
zsh/rc: Don't change umask as root.
authorSimon Ruderich <simon@ruderich.org>
Thu, 20 Dec 2012 20:42:24 +0000 (21:42 +0100)
committerSimon Ruderich <simon@ruderich.org>
Thu, 20 Dec 2012 20:42:24 +0000 (21:42 +0100)
zsh/rc

diff --git a/zsh/rc b/zsh/rc
index a789428010b66f61180807fcf272c102f8a67df4..bb11dd714444ca001058e8a02cdb05867ddc3d4a 100644 (file)
--- a/zsh/rc
+++ b/zsh/rc
@@ -45,8 +45,10 @@ resolve_fg_to_resumed_job_name() {
 
 # MISCELLANEOUS SETTINGS
 
-# Be paranoid, new files are readable/writable by me only.
-umask 077
+# Be paranoid, new files are readable/writable by me only, but not as root.
+if [[ $UID -ne 0 ]]; then
+    umask 077
+fi
 
 # Disable beeps.
 setopt nobeep