Only match on log messages containing fail,invalid,

bad or illegal. This prevents matching on systems that
have a name that matches the query.

PR:		conf/107560
Submitted by:	Christian Laursen <cfsl at pil dot dk>
MFC after:	3 days
Approved by:	imp (mentor)
This commit is contained in:
Remko Lodder 2007-02-23 21:42:54 +00:00
parent 6c11797498
commit 217d9e4862
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166928

View File

@ -59,7 +59,7 @@ case "$daily_status_security_loginfail_enable" in
[Yy][Ee][Ss])
echo ""
echo "${host} login failures:"
n=$(catmsgs | egrep -ia "^$yesterday.*(fail|invalid|bad|illegal)" |
n=$(catmsgs | egrep -ia "^$yesterday.*: .* (fail|invalid|bad|illegal)" |
tee /dev/stderr | wc -l)
[ $n -gt 0 ] && rc=1 || rc=0;;
*) rc=0;;