aboutsummaryrefslogtreecommitdiffstats
path: root/cron-sh
diff options
context:
space:
mode:
authorYoann Vandoorselaere <yoann@mandriva.com>1999-12-27 16:33:39 +0000
committerYoann Vandoorselaere <yoann@mandriva.com>1999-12-27 16:33:39 +0000
commit12c59af6cf894a007d68d9bd578705fb6d21278d (patch)
tree90666405d711f8eb14fcb407e59bf6ac0dd8d4c4 /cron-sh
parent400bffd28039227e43fef4229f7d8a0c54bf8256 (diff)
downloadmsec-12c59af6cf894a007d68d9bd578705fb6d21278d.tar
msec-12c59af6cf894a007d68d9bd578705fb6d21278d.tar.gz
msec-12c59af6cf894a007d68d9bd578705fb6d21278d.tar.bz2
msec-12c59af6cf894a007d68d9bd578705fb6d21278d.tar.xz
msec-12c59af6cf894a007d68d9bd578705fb6d21278d.zip
*** empty log message ***
Diffstat (limited to 'cron-sh')
-rwxr-xr-xcron-sh/diff_check.sh2
-rwxr-xr-xcron-sh/security.sh32
2 files changed, 18 insertions, 16 deletions
diff --git a/cron-sh/diff_check.sh b/cron-sh/diff_check.sh
index 9b548d6..1b6f9e4 100755
--- a/cron-sh/diff_check.sh
+++ b/cron-sh/diff_check.sh
@@ -143,9 +143,7 @@ if [[ -s ${TMP} ]]; then
echo -e "\n\n*** Diff Check, ${date} ***\n" >> ${SECURITY_LOG}
cat ${TMP} >> ${SECURITY_LOG}
-
Maillog "*** Diff Check, ${date} ***" "${TMP}"
-
fi
if [[ -f ${TMP} ]]; then
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
+
+
+
+
+
+
+
+