Author: kp
Date: Thu Jan 16 22:08:05 2020
New Revision: 356816
URL: https://svnweb.freebsd.org/changeset/base/356816
Log:
Fix pfdenied not returning any results
When _a is empty we end up with an invalid invocation of pfctl, and no output.
We must add quotes to make it clear to pfctl that we're passing an empty
anchor
name.
PR: 224415
Submitted by: sigsys AT gmail.com
MFC after: 2 weeks
Modified:
head/usr.sbin/periodic/etc/security/520.pfdenied
Modified: head/usr.sbin/periodic/etc/security/520.pfdenied
==============================================================================
--- head/usr.sbin/periodic/etc/security/520.pfdenied Thu Jan 16 21:53:37
2020 (r356815)
+++ head/usr.sbin/periodic/etc/security/520.pfdenied Thu Jan 16 22:08:05
2020 (r356816)
@@ -46,7 +46,7 @@ then
TMP=`mktemp -t security`
for _a in "" $(pfctl -a "blacklistd" -sA 2>/dev/null)
do
- pfctl -a ${_a} -sr -v -z 2>/dev/null | \
+ 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
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"