Pull request for bug #55 - logwatch tries to open log files it does not have access to / op did not request
"Jason Pyeron" <[email protected]> Sun, 4 Dec 2016 20:08:26 -0500
| Newsgroups | gmane.comp.log.logwatch.devel |
|---|---|
| Organization | PD Inc |
| Message-ID | <20F15AA880634308836493A93DB74C4C@black7> |
The change does not impact existing users / the defaults preserve the same (old) logic.
https://sourceforge.net/p/logwatch/git/merge-requests/3/
https://sourceforge.net/u/jpyeron/logwatch/ci/6c1a2c2397981d4a841fd6e772f4bdc493e392de/
https://sourceforge.net/u/jpyeron/logwatch/ci/issue-55/
Moved the hard coded list from the:
foreach my $dir ("$Config{'logdir'}/", "/var/adm/", "/var/log/", "")
to a computed array. The array omits any of the search paths if so configured:
push @LogDirs, "/var/adm/" if $Config{'appendvaradmtologdirs'};
push @LogDirs, "/var/log/" if $Config{'appendvarlogtologdirs'};
push @LogDirs, "" if $Config{'appendcwdtologdirs'};
the defaults for the config, ensures no action includes them:
$Config{'appendvaradmtologdirs'} = 1;
$Config{'appendvarlogtologdirs'} = 1;
$Config{'appendcwdtologdirs'} = 1;
commit 6c1a2c2397981d4a841fd6e772f4bdc493e392de
Author: Jason Pyeron <[email protected]>
Date: Sun Dec 4 14:12:48 2016 -0500
bug #55: adds 3 configuration options to surpress hard coded search path
* AppendVarAdmToLogDirs
* AppendVarLogToLogDirs
* AppendCWDToLogDirs
-Jason
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- -
- Jason Pyeron PD Inc. http://www.pdinc.us -
- Principal Consultant 10 West 24th Street #100 -
- +1 (443) 269-1555 x333 Baltimore, Maryland 21218 -
- -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
------------------------------------------------------------------------------