Bug#279635: [Logcheck-devel] Bug#279635: logcheck: empty line in `local' file is copied to egrep pattern file

Jim Meyering jim at meyering.net
Thu Nov 4 21:48:54 UTC 2004


Todd Troxell <ttroxell at debian.org> wrote:
...
>>  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?
>
> Did we get a patch applied in the wrong place?

Could have sworn I checked.
I suspect that the one that needs to be changed is in cleanrules:

		# pipe to cat on greps to get usable exit status
		egrep --text -v '^[[:space:]]\+$|^#' $dir/$rulefile | cat \

The original patch looks like it might be worth keeping, nonetheless.





More information about the Logcheck-devel mailing list