Bug 75086
Summary: | logwatch does not generate messages for all configured categories | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Manfred Hollstein <manfredh> |
Component: | logwatch | Assignee: | Elliot Lee <sopwith> |
Status: | CLOSED RAWHIDE | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 8.0 | CC: | eric-bugs, kilpatds, redhat |
Target Milestone: | --- | Keywords: | Security |
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2002-10-15 13:37:24 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 80064 | ||
Attachments: |
Description
Manfred Hollstein
2002-10-04 09:59:42 UTC
Created attachment 78584 [details]
/var/log/messages file used to run logwatch with
Created attachment 78585 [details]
Expected results - generated with RHL 7.3's perl-5.6.1
Created attachment 78586 [details]
Results generated on the same system from the same messages, but using the standard perl-5.8.0
See also but 72809 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=72809 The basic problem is a dependency issue. The filters are dependant on each other: One filter removes the time stamps, the other assumes the time stamps are there. You can "fix" it for RHL 8.0 by futzing with sort/reverse when the keys when constructing the filter list for running the individual logwatch scripts. Obviously, this isn't the correct answer... There are only two filters actually used, "OnlyService" and "RemoveHeaders", so its easy to randomly get the right order from the hash table. However ... It really needs depenency info. The missing firewall info needs further comment. The firewall rules created by lokkit does not do any logging. In addition, the kernel service in logwatch can only parse ipchains logs - and since iptables is now used in 8.0, it will no longer work even if dropped packets were logged. I'm not using a firewall generated by lokkit. Due to whatever constraints I'm still using my good'n'ole ipchains firewall. Look at the attached messages file. ICK! Never rely on the raw order of items in a hash. In Perl 5.8.0, they changed the hash algorithm. This needs to be fixed properly. However, for people that HAVE to get this working, this is a quick and dirty patch that works (but it is crappy programming, so don't attribute it to me). This relies on the fact that by chance, the desired order of operations of "shared" scripts happens to be their alphabetical order. In the script /etc/log.d/scripts/logwatch.pl change lines 474 and 527 (or, you can do a search on the keyword "reverse" as it only appears in the script twice). Change "reverse" to "sort" both in both locations. The proper fix is not to store these items in a hash, but rather in an array and use that order (or its reverse). However, the above "reverse" to "sort" fix can be made more robust and "proper" by renaming the scripts in the shared area from"scriptname" to "XX-scriptname" where XX is a numeric that identifies the order (similar to the /etc/rc.d/rcX.d script order). Logwatch 4.0 fixes If you can do it, this needs to be released as a patch. I think missing log messages represents a grave security risk. You could argue that people who pay attention to the logs will notice the missing bits and come find this bug, but I think that's expecting people to spend an unreasonable amount of effort. I'm creating a new open bug on this. |