Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 51810fb8a9c6bb4d2508289837f958c8 > files > 10

setup-2.5.58-9.el5.src.rpm

diff -urNp setup-2.5.58-orig/bashrc setup-2.5.58/bashrc
--- setup-2.5.58-orig/bashrc	2011-09-23 14:10:37.395075178 +0200
+++ setup-2.5.58/bashrc	2011-09-23 14:14:26.570947616 +0200
@@ -3,14 +3,6 @@
 # System wide functions and aliases
 # Environment stuff goes in /etc/profile
 
-# By default, we want this to get set.
-# Even for non-interactive, non-login shells.
-if [ $UID -gt 99 ] && [ "`id -gn`" = "`id -un`" ]; then
-	umask 002
-else
-	umask 022
-fi
-
 # are we an interactive shell?
 if [ "$PS1" ]; then
   if [ -z "$PROMPT_COMMAND" ]; then
@@ -51,6 +43,15 @@ if ! shopt -q login_shell ; then # We're
 		fi
 	}
 
+    # By default, we want umask to get set. This sets it for non-login shell.
+    # You could check uidgid reservation validity in
+    # /usr/share/doc/setup-*/uidgid file
+    if [ $UID -gt 99 ] && [ "`id -gn`" = "`id -un`" ]; then
+       umask 002
+    else
+       umask 022
+    fi
+
 	# Only display echos from profile.d scripts if we are no login shell
     # and interactive - otherwise just process them to set envvars
     for i in /etc/profile.d/*.sh; do
diff -urNp setup-2.5.58-orig/profile setup-2.5.58/profile
--- setup-2.5.58-orig/profile	2011-09-23 14:10:37.388979590 +0200
+++ setup-2.5.58/profile	2011-09-23 14:12:17.049948442 +0200
@@ -44,6 +44,16 @@ fi
 
 export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
 
+# By default, we want umask to get set. This sets it for login shell
+# Current threshold for system reserved uid/gids is 200
+# You could check uidgid reservation validity in
+# /usr/share/doc/setup-*/uidgid file
+if [ $UID -gt 99 ] && [ "`id -gn`" = "`id -un`" ]; then
+    umask 002
+else
+    umask 022
+fi
+
 for i in /etc/profile.d/*.sh ; do
     if [ -r "$i" ]; then
         if [ "${-#*i}" != "$-" ]; then