Patch to avoid lowercasing logfile paths

"MrC" <[email protected]>
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <012301c78880$8435d3a0$0a02a8c0@yellowstone>
Hi folks,

Below is a patch to prevent lower-casing pathnames values for Logfile
variables in logwatch's config files.  I've been bitten several times now
when I use paths such as:

Logfile = /home/dir/Logs

Logwatch lowercases the path to /home/dir/logs, and of course since that
path does not exist, logwatch happily ignores the nonexistent logfile,
exiting without a trace of info as to why no output was produced (even at
debug 10).

It seems fundamentally wrong for logwatch to treat paths in a
case-insensitive manner, when the *nix file systems are case-sensitive.

Does anyone disagree with this?

--- logwatch.pl 2007-04-26 20:50:46.000000000 -0700
+++ logwatch.pl.patched 2007-04-26 20:50:44.000000000 -0700
@@ -255,7 +255,7 @@
       else { $value = ''; }
 
       push @ReadConfigNames, lc $name;
-      push @ReadConfigValues, getInt $value;
+      push @ReadConfigValues, $name =~ /^logfile$/i ? $value : getInt
$value;
       if ($Config{'debug'} > 7) {
          print "ReadConfigFile: Name=" . $name . ", Value=" . $value .
"\n";
       }


-----
MrC
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.