diff options
author | Yoann Vandoorselaere <yoann@mandriva.com> | 2000-03-08 14:01:47 +0000 |
---|---|---|
committer | Yoann Vandoorselaere <yoann@mandriva.com> | 2000-03-08 14:01:47 +0000 |
commit | f6b197970ba833ea3e629a29805681fde8d4b811 (patch) | |
tree | 55b4fa4ab2962a86b77f5338342d92ab21ebe70d /cron-sh | |
parent | bac62ec2c6fc141a00acd131278befa0ba5f1c5a (diff) | |
download | msec-f6b197970ba833ea3e629a29805681fde8d4b811.tar msec-f6b197970ba833ea3e629a29805681fde8d4b811.tar.gz msec-f6b197970ba833ea3e629a29805681fde8d4b811.tar.bz2 msec-f6b197970ba833ea3e629a29805681fde8d4b811.tar.xz msec-f6b197970ba833ea3e629a29805681fde8d4b811.zip |
*** empty log message ***
Diffstat (limited to 'cron-sh')
-rwxr-xr-x | cron-sh/security.sh | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/cron-sh/security.sh b/cron-sh/security.sh index ee94863..ebe71de 100755 --- a/cron-sh/security.sh +++ b/cron-sh/security.sh @@ -74,11 +74,18 @@ fi netstat -pvlA inet 2> /dev/null > ${OPEN_PORT_TODAY}; # Hard disk related file check; the less priority the better... -nice --adjustment=+19 find ${DIR} -xdev -type f -perm +04000 -user root -printf "${PRINT}" 2> /dev/null | sort > ${SUID_ROOT_TODAY} -nice --adjustment=+19 find ${DIR} -xdev -type f -perm +02000 -printf "${PRINT}" 2> /dev/null | sort > ${SUID_GROUP_TODAY} -nice --adjustment=+19 find ${DIR} -xdev -type f -perm -2 -printf "${PRINT}" 2> /dev/null | sort > ${WRITEABLE_TODAY} -nice --adjustment=+19 find ${DIR} -xdev -nouser -printf "${PRINT}" 2> /dev/null | sort > ${UNOWNED_USER_TODAY} -nice --adjustment=+19 find ${DIR} -xdev -nogroup -printf "${PRINT}" 2> /dev/null | sort > ${UNOWNED_GROUP_TODAY} +nice --adjustment=+19 /usr/bin/msec_find ${DIR} +sort < ${SUID_ROOT_TODAY} > ${SUID_ROOT_TODAY}.tmp +sort < ${SUID_GROUP_TODAY} > ${SUID_GROUP_TODAY}.tmp +sort < ${WRITEABLE_TODAY} > ${WRITEABLE_TODAY}.tmp +sort < ${UNOWNED_USER_TODAY} > ${UNOWNED_USER_TODAY}.tmp +sort < ${UNOWNED_GROUP_TODAY} > ${UNOWNED_GROUP_TODAY}.tmp + +mv -f ${SUID_ROOT_TODAY}.tmp ${SUID_ROOT_TODAY} +mv -f ${SUID_GROUP_TODAY}.tmp ${SUID_GROUP_TODAY} +mv -f ${WRITEABLE_TODAY}.tmp ${WRITEABLE_TODAY} +mv -f ${UNOWNED_USER_TODAY}.tmp ${UNOWNED_USER_TODAY} +mv -f ${UNOWNED_GROUP_TODAY}.tmp ${UNOWNED_GROUP_TODAY} while read line; do md5sum ${line} |