summaryrefslogtreecommitdiffstats
path: root/etc/security
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-02-03 01:28:46 +0000
committerbrian <brian@FreeBSD.org>2001-02-03 01:28:46 +0000
commit6bef3e3d2a63f3fba1dc8c5e6bc0f60ffe41623c (patch)
tree21604174ec769af3765fba833c1f2d554979edb5 /etc/security
parent6ea1307c0576633b6a45fdbf75f50e5db095f477 (diff)
downloadFreeBSD-src-6bef3e3d2a63f3fba1dc8c5e6bc0f60ffe41623c.zip
FreeBSD-src-6bef3e3d2a63f3fba1dc8c5e6bc0f60ffe41623c.tar.gz
Pick up all messages* files less than two days old rather than
just messages{,.0*} when looking for login failures and refused connections. PR: 23415 Mostly submitted by: phk Convert a few " "s to tabs while I'm here - for consistency.
Diffstat (limited to 'etc/security')
-rw-r--r--etc/security17
1 files changed, 9 insertions, 8 deletions
diff --git a/etc/security b/etc/security
index 5f4e7f8..91ec8d6 100644
--- a/etc/security
+++ b/etc/security
@@ -40,19 +40,20 @@ separator () {
}
catmsgs() {
- [ -f $LOG/messages.0.gz ] && zcat $LOG/messages.0.gz
- [ -f $LOG/messages.0 ] && cat $LOG/messages.0
- [ -f $LOG/messages ] && cat $LOG/messages
+ find $LOG -name 'messages.*' -mtime -2 |
+ sort -t. -r -n +1 -2 |
+ xargs zcat -f
+ [ -f $LOG/messages ] && cat $LOG/messages
}
sflag=FALSE ignore=
while getopts ams c
do
- case "$c" in
- a) ignore="$ignore|^amd:";;
- m) ignore="$ignore|^mfs:";;
- s) sflag=TRUE;;
- esac
+ case "$c" in
+ a) ignore="$ignore|^amd:";;
+ m) ignore="$ignore|^mfs:";;
+ s) sflag=TRUE;;
+ esac
done
yesterday=`date -v-1d "+%b %e "`
OpenPOWER on IntegriCloud