aboutsummaryrefslogtreecommitdiffstats
path: root/msec.csh
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-02-26 21:16:08 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-02-26 21:16:08 +0000
commit97462f1870bef29dc13b05bf79dd64d711d6ef53 (patch)
tree536615b4996914f211fe6709776c97e4b0e9ddd3 /msec.csh
parenta22f0be49075b35e71a85542ea5eaa8cd0917276 (diff)
downloadmsec-97462f1870bef29dc13b05bf79dd64d711d6ef53.tar
msec-97462f1870bef29dc13b05bf79dd64d711d6ef53.tar.gz
msec-97462f1870bef29dc13b05bf79dd64d711d6ef53.tar.bz2
msec-97462f1870bef29dc13b05bf79dd64d711d6ef53.tar.xz
msec-97462f1870bef29dc13b05bf79dd64d711d6ef53.zip
msec.csh: "unhash" workaround for /usr/bin non-readable (msec 5) applied
after modifying PATH (eurk!)
Diffstat (limited to 'msec.csh')
-rwxr-xr-xmsec.csh18
1 files changed, 15 insertions, 3 deletions
diff --git a/msec.csh b/msec.csh
index fc0e5b6..137ed2e 100755
--- a/msec.csh
+++ b/msec.csh
@@ -26,20 +26,32 @@ else
endif
endif
-if ! { (echo "${PATH}" | grep -q /usr/X11R6/bin) } then
+
+# (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 ! { (echo "${PATH}" | /bin/grep -q /usr/X11R6/bin) } then
setenv PATH "${PATH}:/usr/X11R6/bin"
endif
-if ! { (echo "${PATH}" | grep -q /usr/games) } then
+if ! { (echo "${PATH}" | /bin/grep -q /usr/games) } then
setenv PATH "${PATH}:/usr/games"
endif
if ( ${?SECURE_LEVEL} && ${SECURE_LEVEL} <= 1 ) then
- if ! { (echo "${PATH}" | fgrep -q :.) } then
+ if ! { (echo "${PATH}" | /bin/fgrep -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/sysconfig/msec to their equivalent in csh
if ( ${?TMOUT} ) then
set autologout=`expr $TMOUT / 60`