From 12c59af6cf894a007d68d9bd578705fb6d21278d Mon Sep 17 00:00:00 2001 From: Yoann Vandoorselaere Date: Mon, 27 Dec 1999 16:33:39 +0000 Subject: *** empty log message *** --- cron-sh/security.sh | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'cron-sh/security.sh') diff --git a/cron-sh/security.sh b/cron-sh/security.sh index 9f97382..f238c07 100755 --- a/cron-sh/security.sh +++ b/cron-sh/security.sh @@ -78,17 +78,17 @@ find ${DIR} -xdev -type f -perm -2 -printf "${PRINT}" 2> /dev/null | sort > ${WR 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 +while read line; do md5sum ${line} -done > ${SUID_MD5_TODAY} +done < ${SUID_ROOT_TODAY} > ${SUID_MD5_TODAY} ### Functions ### Syslog() { if [[ ${SYSLOG_WARN} == yes ]]; then - cat ${1} | while read line; do + while read line; do /sbin/initlog --string="${line}" - done + done < ${1} fi } @@ -104,17 +104,13 @@ Maillog() { subject=${1} text=${2} - if [[ ${MAIL_WARN} != yes ]]; then - return; - fi - - if [[ -z ${MAIL_USER} ]]; then - return; + if [[ ${MAIL_WARN} == yes ]]; then + if [[ ! -z ${MAIL_USER} ]]; then + if [[ -x /bin/mail ]]; then + cat ${text} | /bin/mail -s "${subject}" "${MAIL_USER}" + fi + fi fi - - if [[ -x /bin/mail ]]; then - cat ${text} | /bin/mail -s "${subject}" "${MAIL_USER}" - fi } ################## @@ -122,3 +118,11 @@ Maillog() { . /etc/security/msec/cron-sh/diff_check.sh . /etc/security/msec/cron-sh/security_check.sh + + + + + + + + -- cgit v1.2.1