diff options
author | Frederic Lepied <flepied@mandriva.com> | 2002-02-14 00:52:24 +0000 |
---|---|---|
committer | Frederic Lepied <flepied@mandriva.com> | 2002-02-14 00:52:24 +0000 |
commit | f5f8da18b3aeca5175bbf09f66938190c1ee67fc (patch) | |
tree | ea534bf886f2e049a616c23bb49ed682b584a403 /msec.sh | |
parent | 102709ca341438a5f5a21532b4fd2b6a2f820f97 (diff) | |
download | msec-f5f8da18b3aeca5175bbf09f66938190c1ee67fc.tar msec-f5f8da18b3aeca5175bbf09f66938190c1ee67fc.tar.gz msec-f5f8da18b3aeca5175bbf09f66938190c1ee67fc.tar.bz2 msec-f5f8da18b3aeca5175bbf09f66938190c1ee67fc.tar.xz msec-f5f8da18b3aeca5175bbf09f66938190c1ee67fc.zip |
handle umask and . in path
Diffstat (limited to 'msec.sh')
-rwxr-xr-x | msec.sh | 36 |
1 files changed, 33 insertions, 3 deletions
@@ -1,15 +1,45 @@ +#--------------------------------------------------------------- +# Project : Mandrake Linux +# Module : msec +# File : msec.sh +# Version : $Id$ +# Author : Yoann Vandoorselaere +# Created On : Wed Feb 13 18:35:58 2002 +# Purpose : settings according to security level +#--------------------------------------------------------------- + if [ -r /etc/sysconfig/msec ]; then . /etc/sysconfig/msec fi +if [ `id -u` -ge 500 ]; then + if [ -n "$UMASK_USER" ]; then + umask $UMASK_USER + else + umask 022 + fi +else + if [ -n "$UMASK_ROOT" ]; then + umask $UMASK_ROOT + else + umask 002 + fi +fi + if ! echo ${PATH} |grep -q /usr/X11R6/bin ; then - export PATH=$PATH:/usr/X11R6/bin + export PATH=$PATH:/usr/X11R6/bin fi if ! echo ${PATH} |grep -q /usr/games ; then - export PATH=$PATH:/usr/games + export PATH=$PATH:/usr/games fi -export SECURE_LEVEL=${SECURE_LEVEL} +if [ "$SECURE_LEVEL" -le 1 ] && ! echo ${PATH} | fgrep -q :.; then + export PATH=$PATH:. +fi + +export SECURE_LEVEL [ -n "$TMOUT" ] && typeset -r TMOUT + +# msec.sh ends here |