aboutsummaryrefslogtreecommitdiffstats
path: root/init-sh
diff options
context:
space:
mode:
authorYoann Vandoorselaere <yoann@mandriva.com>1999-11-29 10:09:41 +0000
committerYoann Vandoorselaere <yoann@mandriva.com>1999-11-29 10:09:41 +0000
commit9083d35d35565f571883275dbf3fd77f4ff05f6d (patch)
treebf7f436598a182858f4f9cdca66a94144d39fac6 /init-sh
parentdc637a2be59b2555f16ee6687b2d5bdf8ace3eca (diff)
downloadmsec-9083d35d35565f571883275dbf3fd77f4ff05f6d.tar
msec-9083d35d35565f571883275dbf3fd77f4ff05f6d.tar.gz
msec-9083d35d35565f571883275dbf3fd77f4ff05f6d.tar.bz2
msec-9083d35d35565f571883275dbf3fd77f4ff05f6d.tar.xz
msec-9083d35d35565f571883275dbf3fd77f4ff05f6d.zip
Fix a few bug.
Diffstat (limited to 'init-sh')
-rwxr-xr-xinit-sh/level1.sh10
-rwxr-xr-xinit-sh/level2.sh6
-rwxr-xr-xinit-sh/level3.sh5
-rwxr-xr-xinit-sh/level4.sh14
-rwxr-xr-xinit-sh/level5.sh4
-rw-r--r--init-sh/lib.sh7
6 files changed, 8 insertions, 38 deletions
diff --git a/init-sh/level1.sh b/init-sh/level1.sh
index 01177ba..3d5d300 100755
--- a/init-sh/level1.sh
+++ b/init-sh/level1.sh
@@ -27,7 +27,7 @@ AddRules "SYSLOG_WARN=yes" /etc/security/msec/security.conf
# umask
AddRules "umask 022" /etc/profile
-
+AddRules "SECURE_LEVEL=1" /etc/profile
# Group
usermod -G audio "${USERNAME}"
@@ -38,10 +38,4 @@ xhost + localhost 2>&1 >& /dev/null
lilo
# Path
-if [ ${HAVE_X}==1 ]; then
- AddRules "PATH=$PATH:/usr/X11R6/bin:." /etc/profile
-fi
-
-
-
-
+AddRules "PATH=\$PATH:/usr/X11R6/bin:." /etc/profile
diff --git a/init-sh/level2.sh b/init-sh/level2.sh
index d9397d2..64027da 100755
--- a/init-sh/level2.sh
+++ b/init-sh/level2.sh
@@ -27,7 +27,7 @@ AddRules "SYSLOG_WARN=yes" /etc/security/msec/security.conf
# Permissions
AddRules "umask 002" /etc/profile
-
+AddRules "SECURE_LEVEL=2" /etc/profile
# Group
usermod -G audio ${USERNAME} >& /dev/null
@@ -38,9 +38,7 @@ xhost + localhost 2>&1 >& /dev/null
/sbin/lilo
# Path
-if [ ${HAVE_X}==1 ]; then
- AddRules "PATH=$PATH:/usr/X11R6/bin" /etc/profile
-fi
+AddRules "PATH=\$PATH:/usr/X11R6/bin" /etc/profile
diff --git a/init-sh/level3.sh b/init-sh/level3.sh
index de4e5f3..1c1cfd9 100755
--- a/init-sh/level3.sh
+++ b/init-sh/level3.sh
@@ -37,14 +37,13 @@ AddRules "0 0-23 * * * root nice --adjustment=+19 /etc/security/msec/cron-
# Permissions
AddRules "umask 022" /etc/profile
+AddRules "SECURE_LEVEL=3 /etc/profile
/sbin/lilo
# Path
-if [ ${HAVE_X}==1 ]; then
- AddRules "PATH=$PATH:/usr/X11R6/bin" /etc/profile
-fi
+AddRules "PATH=\$PATH:/usr/X11R6/bin" /etc/profile
diff --git a/init-sh/level4.sh b/init-sh/level4.sh
index f8e00a1..a255b35 100755
--- a/init-sh/level4.sh
+++ b/init-sh/level4.sh
@@ -60,17 +60,5 @@ done
AddRules "umask 022" /etc/profile
# Path
-
-if [ ${HAVE_X}==1 ]; then
- AddRules "PATH=$PATH:/usr/X11R6/bin" /etc/profile
-fi
-
-
-
-
-
-
-
-
-
+AddRules "PATH=\$PATH:/usr/X11R6/bin" /etc/profile
diff --git a/init-sh/level5.sh b/init-sh/level5.sh
index f78de51..b6fd09d 100755
--- a/init-sh/level5.sh
+++ b/init-sh/level5.sh
@@ -53,9 +53,7 @@ done
AddRules "umask 077" /etc/profile
# Path
-if [ ${HAVE_X}==1 ]; then
- AddRules "PATH=$PATH:/usr/X11R6/bin" /etc/profile
-fi
+AddRules "PATH=\$PATH:/usr/X11R6/bin" /etc/profile
echo
echo "You are now running your system in security level 5,"
diff --git a/init-sh/lib.sh b/init-sh/lib.sh
index a48c945..61dfb9e 100644
--- a/init-sh/lib.sh
+++ b/init-sh/lib.sh
@@ -23,12 +23,6 @@ if [ -f /etc/security/msec/security.conf ]; then
. /etc/security/msec/security.conf
fi
-if rpm -q XFree86 2>&1 > /dev/null; then
- HAVE_X=1
-else
- HAVE_X=0
-fi
-
USERNAME="blah"
COMMENT="# Mandrake-Security : if you remove this comment, remove the next line too."
@@ -155,7 +149,6 @@ CleanRules /etc/crontab
# For all secure level
AddRules "echo 1 > /proc/sys/net/ipv4/conf/all/rp_filter" /etc/rc.d/rc.firewall
-
# default group which must exist on the system
groupadd audio >& /dev/null
groupadd xgrp >& /dev/null