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
This commit is contained in:
parent
e82ba2c544
commit
d8ffc21c5c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=356816
@ -46,7 +46,7 @@ then
|
|||||||
TMP=`mktemp -t security`
|
TMP=`mktemp -t security`
|
||||||
for _a in "" $(pfctl -a "blacklistd" -sA 2>/dev/null)
|
for _a in "" $(pfctl -a "blacklistd" -sA 2>/dev/null)
|
||||||
do
|
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}
|
nawk '{if (/^block/) {buf=$0; getline; gsub(" +"," ",$0); if ($5 > 0) print buf$0;} }' >> ${TMP}
|
||||||
done
|
done
|
||||||
if [ -s ${TMP} ]; then
|
if [ -s ${TMP} ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user