Bug 63279

Summary: logwatch is a mess, cron and samba incompatibility
Product: [Retired] Red Hat Linux Reporter: Michael Schwendt <bugs.michael>
Component: logwatchAssignee: Elliot Lee <sopwith>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-04-11 22:29:05 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:
Attachments:
Description Flags
patch against logwatch-2.6-1 none

Description Michael Schwendt 2002-04-11 22:28:30 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020311

Description of problem:
logwatch as shipped with Enigma errata and Skipjack-beta2 fails to parse
/var/log/cron and /var/log/samba/log.* due to date preprocessing code which is
out-of-date and incompatible with the current format of dates in /var/log.


Version-Release number of selected component (if applicable):
2.6-1

How reproducible:
Always

Steps to Reproduce:
1. su -l root
2. logwatch --debug=10 --detail=10 &> out.txt
3. less out.txt  and  look at logwatch mail to root


Actual Results:  The log file preprocessors for cron and samba don't match any
line at all.

Notice how /etc/log.d/scripts/logfiles/cron/applydate is called and checks for a
wrong date prefix. That filter ought to be dropped. Cron logs in standard date
format.

Also notice how Samba's logs seem to be checked for a wrong date format, too,
(at least debug output says that) but internally the Perl script checks a second
format. Unfortunately, it gets that one completely wrong, too, and doesn't strip
off the carriage return, and  additionally uses a wrong regular expression that
is incompatible with the Samba log format of Red Hat Linux.


Additional info:

I'll attach one possible fix, but my motivation to fix logwatch is close to
non-existant.

Comment 1 Michael Schwendt 2002-04-11 22:29:00 UTC
Created attachment 53504 [details]
patch against logwatch-2.6-1

Comment 2 Elliot Lee 2002-04-15 18:12:13 UTC
applied in 2.6-2, thanks