conf/96658: [patch] Missing variable in grep statement in 470.status-named

James Snow snow at teardrop.org
Tue May 2 12:50:20 UTC 2006


>Number:         96658
>Category:       conf
>Synopsis:       [patch] Missing variable in grep statement in 470.status-named
>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:   Tue May 02 12:50:18 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     James Snow
>Release:        FreeBSD 6.1-RC i386
>Organization:
>Environment:
System: FreeBSD isengard.teardrop.org 6.1-RC FreeBSD 6.1-RC #1: Thu Apr 27 20:32:12 EDT 2006 snow at isengard.teardrop.org:/usr/obj/usr/src/sys/ISENGARD  i386


>Description:
The $start variable is missing from the grep statement in the
470.status-named script.  This causes this script to list failed zone
transfers that have occured since the /var/log/messages file was last
rotated rather than in the last day.

>How-To-Repeat:

isengard:~> date
Tue May  2 08:39:40 EDT 2006
isengard:~> grep -E '.*named.*REFUSED' /var/log/messages
Feb 28 20:58:34 isengard named[385]: transfer of 'teardrop.org/IN' from
172.31.255.1#53: failed while receiving responses: REFUSED
isengard:~> sh /etc/periodic/daily/470.status-named.orig 

Checking for denied zone transfers (AXFR and IXFR):
1 teardrop.org from 172.31.255.1 (silver.teardrop.org)

>Fix:

	

--- 470.status-named.patch begins here ---
--- etc/periodic/daily/470.status-named.orig	Tue May  2 08:24:44 2006
+++ etc/periodic/daily/470.status-named	Tue May  2 08:24:53 2006
@@ -31,7 +31,7 @@
 
 	start=`date -v-1d '+%b %e'`
 	rc=$(catmsgs |
-	    fgrep -E ".*named\[[[:digit:]]+\]: transfer of .*failed .*: REFUSED" |
+	    fgrep -E "^$start.*named\[[[:digit:]]+\]: transfer of .*failed .*: REFUSED" |
 	    sed -e "s/.*transfer of \'\(.*\)\/IN\' from \(.*\)#[0-9]*: .*/\1 from \2/" |
 	    sort -f | uniq -ic | (
 		usedns=0
--- 470.status-named.patch ends here ---


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


More information about the freebsd-bugs mailing list