diff options
author | Kristof Provost <kp@FreeBSD.org> | 2020-01-16 22:08:05 +0000 |
---|---|---|
committer | Kristof Provost <kp@FreeBSD.org> | 2020-01-16 22:08:05 +0000 |
commit | d8ffc21c5ca6f7d4f2d9a65dc6308699af0b6a01 (patch) | |
tree | e1065f739e56882c90b81d6a35486e55e9d9734c /usr.sbin | |
parent | e82ba2c5445c1995e1ceb4f17b04cae4b86fb623 (diff) | |
download | src-d8ffc21c5ca6f7d4f2d9a65dc6308699af0b6a01.tar.gz src-d8ffc21c5ca6f7d4f2d9a65dc6308699af0b6a01.zip |
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
Notes
Notes:
svn path=/head/; revision=356816
Diffstat (limited to 'usr.sbin')
-rwxr-xr-x | usr.sbin/periodic/etc/security/520.pfdenied | 2 |
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 e3021ce857c9..69d9df78436b 100755 --- a/usr.sbin/periodic/etc/security/520.pfdenied +++ b/usr.sbin/periodic/etc/security/520.pfdenied @@ -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 |