summaryrefslogtreecommitdiffstats
path: root/etc/security
diff options
context:
space:
mode:
authornate <nate@FreeBSD.org>1996-10-12 04:51:09 +0000
committernate <nate@FreeBSD.org>1996-10-12 04:51:09 +0000
commitab2b99c79bba537046cc946a72c2d1afa7e44eb4 (patch)
tree94125d64b44847f8928c2a67b3d0e5f8c2978e5e /etc/security
parent67bda81defabd8379767f7e5a6f0505f57e2777f (diff)
downloadFreeBSD-src-ab2b99c79bba537046cc946a72c2d1afa7e44eb4.zip
FreeBSD-src-ab2b99c79bba537046cc946a72c2d1afa7e44eb4.tar.gz
In the same manner that we log the ipfw entries, log the kernel log
messages using the output of dmesg.
Diffstat (limited to 'etc/security')
-rw-r--r--etc/security18
1 files changed, 17 insertions, 1 deletions
diff --git a/etc/security b/etc/security
index 1909ed2..8f1550d 100644
--- a/etc/security
+++ b/etc/security
@@ -1,7 +1,7 @@
#!/bin/sh -
#
# @(#)security 5.3 (Berkeley) 5/28/91
-# $Id: security,v 1.13 1996/06/30 19:35:20 alex Exp $
+# $Id: security,v 1.14 1996/07/31 06:47:05 pst Exp $
#
PATH=/sbin:/bin:/usr/bin
LC_ALL=C; export LC_ALL
@@ -68,4 +68,20 @@ if ipfw -a l 2>/dev/null | egrep "deny|reject" > $TMP; then
fi
fi
+# show denied packets
+if dmesg 2>/dev/null > $TMP; then
+ if [ ! -f $LOG/dmesg.today ] ; then
+ separator
+ echo "no $LOG/dmesg.today"
+ cp $TMP $LOG/dmesg.today
+ fi
+ if cmp $LOG/dmesg.today $TMP >/dev/null; then :; else
+ separator
+ echo "$host kernel log messages:"
+ diff -b $LOG/dmesg.today $TMP | egrep "^>"
+ mv $LOG/dmesg.today $LOG/dmesg.yesterday
+ mv $TMP $LOG/dmesg.today
+ fi
+fi
+
rm -f $TMP
OpenPOWER on IntegriCloud