misc/187224: /etc/periodic/security/520.pfdenied enhancement

Kurt J Lidl lidl at pix.net
Mon Mar 3 16:00:00 UTC 2014


>Number:         187224
>Category:       misc
>Synopsis:       /etc/periodic/security/520.pfdenied enhancement
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 03 16:00:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Kurt J Lidl
>Release:        9.2
>Organization:
>Environment:
FreeBSD [redatced] 9.1-RELEASE-p10 FreeBSD 9.1-RELEASE-p10 #0: Sun Jan 12 10:32:09 UTC 2014     root at amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
The /etc/periodic/security/520.pfdenied script produces a line of output for all
lines in the PF file, not just those that cause a deny to happen.

>How-To-Repeat:

>Fix:
Basically, only print the line if the 5th field isn't empty.

diff -r /etc/periodic/security/520.pfdenied /var/ibmpc01/etc/periodic/security/520.pfdenied
47c45
< 	if pfctl -sr -v 2>/dev/null | nawk '{if (/^block/) {buf=$0; getline; gsub(" +"," ",$0); print buf$0;} }' > ${TMP}; then
---
> 	if pfctl -sr -v 2>/dev/null | nawk '{if (/^block/) {buf=$0; getline; gsub(" +"," ",$0); if ($5>0) print buf$0;} }' > ${TMP}; then


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list