Bug 472226 - argument list too long when trying to cat lots of log files
Summary: argument list too long when trying to cat lots of log files
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: logwatch
Version: 9
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Ivana Varekova
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-11-19 14:29 UTC by Zing
Modified: 2008-11-27 13:11 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-11-27 13:11:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.