summaryrefslogtreecommitdiffstats
path: root/etc/periodic
diff options
context:
space:
mode:
authorlidl <lidl@FreeBSD.org>2016-06-02 19:06:04 +0000
committerlidl <lidl@FreeBSD.org>2016-06-02 19:06:04 +0000
commit6f31a383cc6d2459585d754d3d30f980487df06f (patch)
tree45c1a8bc32e7b9d60122086211c8fa6df289de16 /etc/periodic
parent44920da28cde32f352e76a4220b068c8f623c60d (diff)
downloadFreeBSD-src-6f31a383cc6d2459585d754d3d30f980487df06f.zip
FreeBSD-src-6f31a383cc6d2459585d754d3d30f980487df06f.tar.gz
Add basic blacklist build support
Reviewed by: rpaulo Approved by: rpaulo Relnotes: YES Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D5913
Diffstat (limited to 'etc/periodic')
-rwxr-xr-xetc/periodic/security/520.pfdenied10
1 files changed, 8 insertions, 2 deletions
diff --git a/etc/periodic/security/520.pfdenied b/etc/periodic/security/520.pfdenied
index f2f9e8a..850c10d 100755
--- a/etc/periodic/security/520.pfdenied
+++ b/etc/periodic/security/520.pfdenied
@@ -44,8 +44,14 @@ rc=0
if check_yesno_period security_status_pfdenied_enable
then
TMP=`mktemp -t security`
- if pfctl -sr -v -z 2>/dev/null | nawk '{if (/^block/) {buf=$0; getline; gsub(" +"," ",$0); if ($5 > 0) print buf$0;} }' > ${TMP}; then
- check_diff new_only pf ${TMP} "${host} pf denied packets:"
+ touch ${TMP}
+ for _a in "" blacklistd
+ do
+ pfctl -a ${_a} -sr -v -z 2>/dev/null | \
+ nawk '{if (/^block/) {buf=$0; getline; gsub(" +"," ",$0); if ($5 > 0) print buf$0;} }' >> ${TMP}
+ done
+ if [ -s ${TMP} ]; then
+ check_diff new_only pf ${TMP} "${host} pf denied packets:"
fi
rc=$?
rm -f ${TMP}
OpenPOWER on IntegriCloud