Stéphane Gourichon
2013-May-13 11:44 UTC
[Logcheck-devel] Logcheck wrong message in corner case and simple fix.
Hi logcheck maintainer team, I've been in the situation where I use an alternative logcheck.files location and logcheck sees an error. (In reading the fine manual I stumbled upon a minor remark : http://logcheck.org/git.html invites to follow git's http://repo.or.cz/w/git.git?a=blob;f=Documentation/SubmittingPatches;hb=HEAD . Logcheck has no branches "maint", "pu", "next". The problem and patch are trivial anyway.) logcheck send this text :> Also verify that the logcheck user can read all files referenced in > /etc/logcheck/logcheck.logfiles!The path mention is the default location of logcheck.files , not the one actually processed. Logcheck definitely processed the correct logcheck.files since in the same e-mail it complains about unreadable log files mentioned there. The reason is simple : the text is hard-coded in script source. The fix is trivial enough, replace hard-coded text by the variable LOGFILES_LIST which is set at the beginning and available throughout the script. See patch below. diff --git a/src/logcheck b/src/logcheck index 34c235b..331ed84 100755 --- a/src/logcheck +++ b/src/logcheck @@ -169,8 +169,8 @@ $message ${TMPDIR:+Check temporary directory: $TMPDIR } -Also verify that the logcheck user can read all files referenced in -/etc/logcheck/logcheck.logfiles! +Also verify that the logcheck user can read all files referenced in: +$LOGFILES_LIST $(export) EOF What do you think ? Regards, -- St?phane Gourichon