Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Jan 2020 22:08:05 +0000 (UTC)
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r356816 - head/usr.sbin/periodic/etc/security
Message-ID:  <202001162208.00GM85Mj069643@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001162208.00GM85Mj069643>