aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2026-06-03 08:49:31 +0000
committerKristof Provost <kp@FreeBSD.org>2026-06-10 07:49:01 +0000
commit4df539cc3864f45e980774ac77238e0781b930d7 (patch)
tree25a2827a3672fd7aff0523ef197ba478fc719c1c
parentbddfcbd9bbc68fe11ce53954b7f82584cd5ee40b (diff)
pfdenied: fix checking root anchor
pfctl doesn't like empty anchors (-a ''), but we can specify the root anchor as '/' too, so do that instead. PR: 295324 Tested by: Paweł Krawczyk MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 3d9cd10b2857ee7a9ec1b04457d9ec44f614d32c)
-rwxr-xr-xusr.sbin/periodic/etc/security/520.pfdenied2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/periodic/etc/security/520.pfdenied b/usr.sbin/periodic/etc/security/520.pfdenied
index 9852936257bc..ddf32e5a34b4 100755
--- a/usr.sbin/periodic/etc/security/520.pfdenied
+++ b/usr.sbin/periodic/etc/security/520.pfdenied
@@ -41,7 +41,7 @@ rc=0
if check_yesno_period security_status_pfdenied_enable
then
TMP=`mktemp -t security`
- for _a in "" $(pfctl -a "blacklistd" -sA 2>/dev/null) ${security_status_pfdenied_additionalanchors}
+ for _a in "/" $(pfctl -a "blacklistd" -sA 2>/dev/null) ${security_status_pfdenied_additionalanchors}
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}