aboutsummaryrefslogtreecommitdiffstats
path: root/cron-sh/security.sh
diff options
context:
space:
mode:
authorYoann Vandoorselaere <yoann@mandriva.com>1999-12-20 16:56:06 +0000
committerYoann Vandoorselaere <yoann@mandriva.com>1999-12-20 16:56:06 +0000
commitc0cb4cdf9c1ffae8f9d5e6bf07d79daf21561625 (patch)
treeb6b0e0c878025162263e51515934b0a5aa152742 /cron-sh/security.sh
parent05ac8ef91d281e08aed417a44a2decad2ed4ac63 (diff)
downloadmsec-c0cb4cdf9c1ffae8f9d5e6bf07d79daf21561625.tar
msec-c0cb4cdf9c1ffae8f9d5e6bf07d79daf21561625.tar.gz
msec-c0cb4cdf9c1ffae8f9d5e6bf07d79daf21561625.tar.bz2
msec-c0cb4cdf9c1ffae8f9d5e6bf07d79daf21561625.tar.xz
msec-c0cb4cdf9c1ffae8f9d5e6bf07d79daf21561625.zip
*** empty log message ***
Diffstat (limited to 'cron-sh/security.sh')
-rwxr-xr-xcron-sh/security.sh21
1 files changed, 9 insertions, 12 deletions
diff --git a/cron-sh/security.sh b/cron-sh/security.sh
index 054a312..10eb54b 100755
--- a/cron-sh/security.sh
+++ b/cron-sh/security.sh
@@ -30,7 +30,6 @@ UNOWNED_GROUP_YESTERDAY="/var/log/security/unowned_group.yesterday"
UNOWNED_GROUP_DIFF="/var/log/security/unowned_group.diff"
# Modified filters coming from debian security scripts.
-
CS_NFSAFS='(nfs|afs|xfs|coda)'
CS_TYPES=' type (devpts|auto|proc|msdos|fat|vfat|iso9660|ncpfs|smbfs|'$CS_NFSAFS')'
CS_DEVS='^/dev/fd'
@@ -38,9 +37,6 @@ CS_DIRS='on /mnt'
FILTERS="$CS_TYPES|$CS_DEVS|$CS_DIRS"
DIR=`mount | grep -vE "$FILTERS" | cut -d ' ' -f3`
PRINT="%h/%f\n"
-#PRINT="%8i %5m %3n %-10u %-10g %9s %t %h/%f\n"
-
-
if [[ ! -d /var/log/security ]]; then
mkdir /var/log/security
@@ -74,20 +70,21 @@ if [[ -s ${SUID_MD5_TODAY} ]]; then
mv ${SUID_MD5_TODAY} ${SUID_MD5_YESTERDAY};
fi
-netstat -pvlA inet > ${OPEN_PORT_TODAY};
-find ${DIR} -xdev -type f -perm +04000 -user root -printf "${PRINT}" | sort > ${SUID_ROOT_TODAY}
-find ${DIR} -xdev -type f -perm +02000 -printf "${PRINT}" | sort > ${SUID_GROUP_TODAY}
-find ${DIR} -xdev -type f -perm -2 -printf "${PRINT}" | sort > ${WRITEABLE_TODAY}
-find ${DIR} -xdev -nouser -printf "${PRINT}" | sort > ${UNOWNED_USER_TODAY}
-find ${DIR} -xdev -nogroup -printf "${PRINT}" | sort > ${UNOWNED_GROUP_TODAY}
+
+netstat -pvlA inet 2> /dev/null > ${OPEN_PORT_TODAY};
+find ${DIR} -xdev -type f -perm +04000 -user root -printf "${PRINT}" 2> /dev/null | sort > ${SUID_ROOT_TODAY}
+find ${DIR} -xdev -type f -perm +02000 -printf "${PRINT}" 2> /dev/null | sort > ${SUID_GROUP_TODAY}
+find ${DIR} -xdev -type f -perm -2 -printf "${PRINT}" 2> /dev/null | sort > ${WRITEABLE_TODAY}
+find ${DIR} -xdev -nouser -printf "${PRINT}" 2> /dev/null | sort > ${UNOWNED_USER_TODAY}
+find ${DIR} -xdev -nogroup -printf "${PRINT}" 2> /dev/null | sort > ${UNOWNED_GROUP_TODAY}
cat ${SUID_ROOT_TODAY} | while read line; do
md5sum ${line}
done > ${SUID_MD5_TODAY}
-/etc/security/msec/cron-sh/diff_check.sh
-/etc/security/msec/cron-sh/security_check.sh
+. /etc/security/msec/cron-sh/diff_check.sh
+. /etc/security/msec/cron-sh/security_check.sh