Bug#279635: [Logcheck-devel] Bug#279635: logcheck: empty line in `local' file is copied to egrep pattern file
Gerfried Fuchs
alfie at ist.org
Fri Nov 5 10:32:59 UTC 2004
tag 279635 + pending
thanks
* Todd Troxell <ttroxell at debian.org> [2004-11-04 16:39]:
> On Thu, Nov 04, 2004 at 10:45:07AM +0100, Jim Meyering wrote:
>> With the installation of logcheck-1.2.30, I started getting hundreds
>> of lines of messages every hour. The problem was that
>> I had a blank line in violations.d/local.
Bad boy. ,) *ducks*
>> Here's a patch that fixed it:
>>
>> --- /usr/sbin/logcheck.~5~ 2004-11-04 10:04:55.000000000 +0100
>> +++ /usr/sbin/logcheck 2004-11-04 10:30:21.000000000 +0100
>> @@ -615,7 +615,7 @@
>> mkdir $TMPDIR/logoutput \
>> || error "Could not mkdir for log files"
>> if [ ! $LOGFILE ]; then
>> - for file in $(egrep --text -v "(^#|^[[:space:]]\+$)" $LOGFILES_LIST); do
>> + for file in $(egrep --text -v "(^#|^[[:space:]]*$)" $LOGFILES_LIST); do
>> logoutput "$file"
>> done
>> elif [ $LOGFILE ]; then
>
> I am confused. Doesn't line 618 just parse the list of logfiles to be
> processed? How could this cause a blank line in violations.d/local to be a
> problem?
Your last question is interesting.
> Did we get a patch applied in the wrong place?
Yes, unfortunately... I did fumble, too... Mea maxima culpa, and
thanks Jim for finding it!
I'll check my changes again to see if I've done it in other places,
too...
So long,
Alfie
--
To err is human -- but it feels divine.
-- Mae West
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/logcheck-devel/attachments/20041105/697e51e9/attachment.pgp
More information about the Logcheck-devel
mailing list