aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorAntoine Brodin <antoine@FreeBSD.org>2008-08-10 18:11:24 +0000
committerAntoine Brodin <antoine@FreeBSD.org>2008-08-10 18:11:24 +0000
commit86e82d6ef77b4e0d927fbec702a950c961f75f60 (patch)
tree3f116808e9278006c5dca0d4e2140123f5c81444 /etc
parenta448322d4ea24bb67b7cfed7866d4c0f56a9c496 (diff)
downloadsrc-86e82d6ef77b4e0d927fbec702a950c961f75f60.tar.gz
src-86e82d6ef77b4e0d927fbec702a950c961f75f60.zip
Notes
Diffstat (limited to 'etc')
-rwxr-xr-xetc/periodic/security/550.ipfwlimit9
1 files changed, 3 insertions, 6 deletions
diff --git a/etc/periodic/security/550.ipfwlimit b/etc/periodic/security/550.ipfwlimit
index 6c2e1a04014a..daa0f86321f8 100755
--- a/etc/periodic/security/550.ipfwlimit
+++ b/etc/periodic/security/550.ipfwlimit
@@ -42,19 +42,16 @@ rc=0
case "$daily_status_security_ipfwlimit_enable" in
[Yy][Ee][Ss])
- IPFW_LOG_LIMIT=`sysctl -n net.inet.ip.fw.verbose_limit 2> /dev/null`
- if [ $? -ne 0 ]; then
+ IPFW_VERBOSE=`sysctl -n net.inet.ip.fw.verbose 2> /dev/null`
+ if [ $? -ne 0 ] || [ "$IPFW_VERBOSE" -eq 0 ]; then
exit 0
fi
TMP=`mktemp -t security`
ipfw -a list | grep " log " | \
grep '^[[:digit:]]\+[[:space:]]\+[[:digit:]]\+' | \
- awk -v limit="$IPFW_LOG_LIMIT" \
+ awk \
'{if ($6 == "logamount") {
if ($2 > $7)
- {print $0}
- } else {
- if ($2 > limit)
{print $0}}
}' > ${TMP}