aboutsummaryrefslogtreecommitdiffstats
path: root/profile.d/msec.csh
blob: 2bfe08de0ca2e9cfa9e5bfa662f1aa7324d237e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# shell security options

if ( -r /etc/security/shell ) then
	eval `sed -n 's/^\([^#]*\)=\([^#]*\)/set \1=\2;/p' < /etc/security/shell`
endif

if ( $uid >= 500 ) then
    if ( ${?UMASK_USER} ) then
	umask ${UMASK_USER}
    else
	umask 022
    endif
else
    if ( ${?UMASK_ROOT} ) then
	umask ${UMASK_ROOT}
    else
	umask 002
    endif
endif


# (pixel) tcsh doesn't handle directory in the PATH being non-readable
# in security high, /usr/bin is 751, aka non-readable
# using unhash *after modifying PATH* fixes the pb
# So while modifying the PATH, do not rely on the PATH until unhash is done

if ( ${?ALLOW_CURDIR_IN_PATH} == 'yes' ) then
    if ! { (echo "${PATH}" | /bin/grep -F -q :.) } then
        setenv PATH "${PATH}:."
    endif
endif

# using unhash *after modifying PATH* (see above)
if (! -r /usr/bin) then
  unhash
endif


# translate sh variables from /etc/security/shell to their equivalent in csh
if ( ${?TMOUT} ) then
    set autologout=`expr $TMOUT / 60`
endif

if ( ${?HISTFILESIZE} ) then
    set history=$HISTFILESIZE
endif

if ( ${?SECURE_LEVEL} ) then
    setenv SECURE_LEVEL ${SECURE_LEVEL}
endif

# msec.csh ends here