Bug 472226

Summary: argument list too long when trying to cat lots of log files
Product: [Fedora] Fedora Reporter: Zing <zing>
Component: logwatchAssignee: Ivana Varekova <varekova>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: medium    
Version: 9CC: varekova
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: 2008-11-27 13:11:12 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:

Description Zing 2008-11-19 14:29:42 UTC
Description of problem:

Here is the error I get:

/etc/cron.daily/0logwatch:

Can't exec "/bin/sh": Argument list too long at /etc/cron.daily/0logwatch line 980.
system cat /var/log/samba/log.t42 <SNIP LONG LIST OF SAMBA LOGFILES> /var/log/samba/log.0.0.0.0.old /var/log/samba/log.0.0.0.0  | /usr/bin/perl /usr/share/logwatch/scripts/logfiles/samba/applydate| /usr/bin/perl /usr/share/logwatch/scripts/logfiles/samba/removeheaders>/var/cache/logwatch/logwatch.RGnerkUu/samba failed: -1 at /etc/cron.daily/0logwatch line 980.

Version-Release number of selected component (if applicable):
logwatch-7.3.6-25.fc9.noarch

Steps to Reproduce:

Create a lot of log files in /var/log/samba/.   logwatch will try to run a command line that's too long for sh.
  
Actual results:
the above error.

Expected results:
successfull logwatch run

Additional info:
Although this hits samba because it will create a lot of log files, I imagine this could hit other logs that do the same thing.

Comment 1 Ivana Varekova 2008-11-20 12:01:58 UTC
I'm not sure whether this problem could be fixed - I will ask logwatch upstream about their opinion, but I don't think there is the possibility to change/improve this behavior.