Date: Tue, 2 May 2006 08:49:43 -0400 (EDT) From: James Snow <snow@teardrop.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: conf/96658: [patch] Missing variable in grep statement in 470.status-named Message-ID: <20060502124944.0A761C128@silver.teardrop.org> Resent-Message-ID: <200605021250.k42CoJRc055613@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060502124944.0A761C128>