From nobody@FreeBSD.org  Mon Mar  3 15:58:55 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 5F844858
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  3 Mar 2014 15:58:55 +0000 (UTC)
Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 4CCF48C8
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  3 Mar 2014 15:58:55 +0000 (UTC)
Received: from cgiserv.freebsd.org ([127.0.1.6])
	by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s23FwsHY009508
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 3 Mar 2014 15:58:54 GMT
	(envelope-from nobody@cgiserv.freebsd.org)
Received: (from nobody@localhost)
	by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s23Fwsec009507;
	Mon, 3 Mar 2014 15:58:54 GMT
	(envelope-from nobody)
Message-Id: <201403031558.s23Fwsec009507@cgiserv.freebsd.org>
Date: Mon, 3 Mar 2014 15:58:54 GMT
From: Kurt J Lidl <lidl@pix.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: /etc/periodic/security/520.pfdenied enhancement
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         187224
>Category:       conf
>Synopsis:       [patch] /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:  Sun May 04 03:51:56 UTC 2014
>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@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:
