Test rotated logs for dangerous messages as well as current

PR:		misc/12228
Submitted by:	Philippe SCHACK <phschak@inba.fr>
This commit is contained in:
Alexey Zelkin 1999-12-20 17:33:56 +00:00
parent f0eb570607
commit b271db7f20

View File

@ -11,6 +11,8 @@ separator () {
echo ''
}
yesterday=`date -v-1d "+%b %e "`
host=`hostname`
echo "Subject: ${host} security check output"
@ -110,12 +112,12 @@ fi
#
separator
echo "${host} login failures:"
grep -i "login failure" ${LOG}/messages
zcat -f $LOG/messages.0* $LOG/messages | grep -i "^$yesterday.*login failure"
# Show tcp_wrapper warning messages
#
separator
echo "${host} refused connections:"
grep -i "refused connect" ${LOG}/messages
zcat -f $LOG/messages.0* $LOG/messages | grep -i "^$yesterday.*refused connect"
rm -f ${TMP}