aboutsummaryrefslogtreecommitdiffstats
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
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!)
-rwxr-xr-xmsec.csh18
-rw-r--r--msec.spec4
2 files changed, 19 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`
diff --git a/msec.spec b/msec.spec
index 0c86f26..7bc7eaf 100644
--- a/msec.spec
+++ b/msec.spec
@@ -123,6 +123,10 @@ rm -rf $RPM_BUILD_ROOT
# MAKE THE CHANGES IN CVS: NO PATCH OR SOURCE ALLOWED
%changelog
+
+- msec.csh: "unhash" workaround for /usr/bin non-readable (msec 5) applied
+after modifying PATH (eurk!)
+
* Mon Feb 25 2002 Frederic Lepied <flepied@mandrakesoft.com> 0.19-4mdk
- separate config files and other files in the rpmv check (idea
of Michael Reinsch)