Disable specific umask settings by default.
authorMichael Prokop <mika@grml.org>
Sun, 19 Jun 2011 09:59:39 +0000 (11:59 +0200)
committerMichael Prokop <mika@grml.org>
Sun, 19 Jun 2011 09:59:41 +0000 (11:59 +0200)
Recently this turned up into quite a lot of discussion.
/etc/login.defs provides the system wide configuration
which we shouldn't ignore and override. So move our
umask settings from /etc/zsh/zshrc to /etc/skel/.zshrc
and provide it as comments (so disabled by default).

doc/grmlzshrc.t2t
etc/skel/.zshrc
etc/zsh/zshrc

index 621a384..1d810ab 100644 (file)
@@ -26,10 +26,7 @@ features are enabled in every version).
 //grmlzshrc// behaves differently depending on which user loads it. For the
 root user (**EUID** == 0) only a subset of features is loaded by default. This
 behaviour can be altered by setting the **GRML_ALWAYS_LOAD_ALL** STARTUP
-VARIABLE (see below). Also the umask(1) for the root user is set to 022,
-while for regular users it is set to 002. So read/write permissions
-for the regular user and her group are set for new files (keep that
-in mind on systems, where regular users share a common group).
+VARIABLE (see below).
 
 = STARTUP VARIABLES =
 Some of the behaviour of //grmlzshrc// can be altered by setting certain shell
index dd4b14d..9837a97 100644 (file)
@@ -30,6 +30,13 @@ if [ -r ~/.zshrc -a -r ~/.zshrc.global -a ! -r ~/.zshrc.local ] ; then
     printf '-!-\n'
 fi
 
+## Settings for umask
+#if (( EUID == 0 )); then
+#    umask 002
+#else
+#    umask 022
+#fi
+
 ## Now, we'll give a few examples of what you might want to use in your
 ## .zshrc.local file (just copy'n'paste and uncomment it there):
 
index 8455094..c1b4955 100644 (file)
@@ -256,17 +256,6 @@ zrcautoload is-at-least || is-at-least() { return 1 }
 # }}}
 
 # {{{ set some important options (as early as possible)
-# Please update these tags, if you change the umask settings below.
-#o# r_umask     002
-#o# r_umaskstr  rwxrwxr-x
-#o# umask       022
-#o# umaskstr    rwxr-xr-x
-if (( EUID == 0 )); then
-    umask 002
-else
-    umask 022
-fi
-
 setopt append_history       # append history list to the history file (important for multiple parallel zsh sessions!)
 is4 && setopt SHARE_HISTORY # import new commands from the history file also in other zsh-session
 setopt extended_history     # save each command's beginning timestamp and the duration to the history file