aboutsummaryrefslogtreecommitdiffstats
path: root/cron-sh
diff options
context:
space:
mode:
authorFrederic Lepied <flepied@mandriva.com>2002-02-22 18:42:14 +0000
committerFrederic Lepied <flepied@mandriva.com>2002-02-22 18:42:14 +0000
commit34574228404994c812086fd30bb7f78a49d7c3df (patch)
tree4666b944538a6ad0133d86e7ea5fd65dacf35c2c /cron-sh
parent77a72f6e57d31bbc906a8c15916dbadc38ead561 (diff)
downloadmsec-34574228404994c812086fd30bb7f78a49d7c3df.tar
msec-34574228404994c812086fd30bb7f78a49d7c3df.tar.gz
msec-34574228404994c812086fd30bb7f78a49d7c3df.tar.bz2
msec-34574228404994c812086fd30bb7f78a49d7c3df.tar.xz
msec-34574228404994c812086fd30bb7f78a49d7c3df.zip
check uid and not gid
Diffstat (limited to 'cron-sh')
-rwxr-xr-xcron-sh/security_check.sh20
1 files changed, 12 insertions, 8 deletions
diff --git a/cron-sh/security_check.sh b/cron-sh/security_check.sh
index 2b300ba..dcdbfc4 100755
--- a/cron-sh/security_check.sh
+++ b/cron-sh/security_check.sh
@@ -4,13 +4,17 @@
# Written by Vandoorselaere Yoann, <yoann@mandrakesoft.com>
#
-if [[ -f /etc/security/msec/security.conf ]]; then
- . /etc/security/msec/security.conf
+if [[ -f /var/lib/msec/security.conf ]]; then
+ . /var/lib/msec/security.conf
else
- echo "/etc/security/msec/security.conf don't exist."
+ echo "/var/lib/msec/security.conf don't exist."
exit 1
fi
+if [[ -f /etc/security/msec/security.conf ]]; then
+ . /etc/security/msec/security.conf
+fi
+
if [[ ${CHECK_SECURITY} != yes ]]; then
exit 0
fi
@@ -62,7 +66,7 @@ while read username uid homedir; do
for f in ${list} ; do
file="${homedir}/${f}"
if [[ -f ${file} ]] ; then
- printf "${uid} ${username} ${file} `ls -Lldcgn ${file}`\n"
+ printf "${uid} ${username} ${file} `ls -LldcGn ${file}`\n"
fi
done
done | awk '$1 != $6 && $6 != "0" \
@@ -91,7 +95,7 @@ while read username uid homedir; do
for f in ${list} ; do
file=${homedir}/${f}
if [[ -f ${file} ]] ; then
- printf "${uid} ${username} ${file} `ls -Lldcgn ${file}`\n"
+ printf "${uid} ${username} ${file} `ls -LldcGn ${file}`\n"
fi
done
done | awk '$1 != $6 && $6 != "0" \
@@ -110,9 +114,9 @@ fi
awk -F: '/^[^+-]/ { print $1 " " $3 " " $6 }' /etc/passwd | \
while read username uid homedir; do
if [[ -d ${homedir} ]] ; then
- realuid=`ls -Lldgn ${homedir}| awk '{ print $3 }'`
- realuser=`ls -Lldg ${homedir}| awk '{ print $3 }'`
- permissions=`ls -Lldg ${homedir}| awk '{ print $1 }'`
+ realuid=`ls -LldGn ${homedir}| awk '{ print $3 }'`
+ realuser=`ls -LldG ${homedir}| awk '{ print $3 }'`
+ permissions=`ls -LldG ${homedir}| awk '{ print $1 }'`
printf "${permissions} ${username} (${uid}) ${realuser} (${realuid})\n"
fi
done | awk '$3 != $5 && $5 != "(0)" \