aboutsummaryrefslogtreecommitdiffstats
path: root/init-sh
diff options
context:
space:
mode:
authorYoann Vandoorselaere <yoann@mandriva.com>1999-12-08 12:44:09 +0000
committerYoann Vandoorselaere <yoann@mandriva.com>1999-12-08 12:44:09 +0000
commit3645c42f079cf927c98e84c22b1a22daf0ee5324 (patch)
tree28242efc8ace94ac88b1015f60393113a30c6c74 /init-sh
parent438a524ba20e9a089cf256a614edfcb85ff8fde7 (diff)
downloadmsec-3645c42f079cf927c98e84c22b1a22daf0ee5324.tar
msec-3645c42f079cf927c98e84c22b1a22daf0ee5324.tar.gz
msec-3645c42f079cf927c98e84c22b1a22daf0ee5324.tar.bz2
msec-3645c42f079cf927c98e84c22b1a22daf0ee5324.tar.xz
msec-3645c42f079cf927c98e84c22b1a22daf0ee5324.zip
*** empty log message ***
Diffstat (limited to 'init-sh')
-rwxr-xr-xinit-sh/custom.sh12
-rwxr-xr-xinit-sh/level5.sh2
2 files changed, 7 insertions, 7 deletions
diff --git a/init-sh/custom.sh b/init-sh/custom.sh
index 367f5aa..459d0c8 100755
--- a/init-sh/custom.sh
+++ b/init-sh/custom.sh
@@ -134,15 +134,14 @@ echo "This is only valuable for server installed with rpm."
WaitAnswer; clear
if [ ${answer} == "yes" ]; then
echo -n "Disabling all service, except : {"
- for service in `chkconfig --list | awk '{print $1}'`; do
- if grep -qx ${service} /etc/security/msec/init-sh/server.5 | grep -v "^#";
- then
+ chkconfig --list | awk '{print $1}' | while read service; do
+ if grep -qx ${service} /etc/security/msec/init-sh/server.4; then
echo -n " ${service}"
fi
done
echo " } : "
- for service in `chkconfig --list | awk '{print $1}'`; do
+ chkconfig --list | awk '{print $1}' | while read service; do
chkconfig --del "${service}"
if ! chkconfig --msec --add "${service}"; then
echo -e "\t- Services ${service} is now disabled."
@@ -156,7 +155,7 @@ echo "Do you want to disallow rpm to automatically enable a new installed server
echo "yes = you will need to chkconfig (--add ) servername for the server to run on boot."
echo "no = rpm will do it for you, but you have less control of what is running on your machine."
WaitAnswer; clear
-if [ ${answer} == "yes" ]; then
+if [ "${answer}" == "yes" ]; then
export SECURE_LEVEL="4"
AddRules "SECURE_LEVEL=\"4\"" /etc/profile
else
@@ -171,7 +170,7 @@ echo "restricted ( for users ) ( 077 ) = user = rwx, group =, other ="
echo "restricted ( for root ) ( 022 ) = user = rwx, = group = rx, other = rx"
echo "paranoid ( 077 ) = user = rwx, group = , other ="
answer="nothing"
-while [[ "${answer}" != "easy" && "${answer}" != "normal" && "${answer} != "restricted" && "${answer}" != "paranoid" ]]; do
+while [[ "${answer}" != "easy" && "${answer}" != "normal" && "${answer}" != "restricted" && "${answer}" != "paranoid" ]]; do
echo -n "easy/normal/restricted/paranoid : "
read answer
done
@@ -188,6 +187,7 @@ case "${answer}" in
"paranoid")
AddRules "umask 077" /etc/profile
;;
+esac
###
echo "Do you want a "." in your PATH variable ?"
diff --git a/init-sh/level5.sh b/init-sh/level5.sh
index cef4831..ea65199 100755
--- a/init-sh/level5.sh
+++ b/init-sh/level5.sh
@@ -101,7 +101,7 @@ echo -e "done.\n";
echo "Setting umask to 077 (u=rw) :"
AddRules "umask 077" /etc/profile
echo "Adding \"normal\" PATH variable :"
-AddRules "PATH=\$PATH:/usr/X11R6/bin:/usr/games" /etc/profile quiet
+AddRules "PATH=\$PATH:/usr/X11R6/bin" /etc/profile quiet
AddRules "export PATH SECURE_LEVEL" /etc/profile
echo