Bug 110683 - Logrotate throws Segmentation fault when doing "maillast" but no last-file is present
Logrotate throws Segmentation fault when doing "maillast" but no last-file is...
Product: Fedora
Classification: Fedora
Component: logrotate (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Vrabec
Depends On:
  Show dependency treegraph
Reported: 2003-11-23 05:50 EST by Mathias Nicolajsen Kjærgaard
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-12-10 04:37:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
This patch solves the probelm on my system (828 bytes, patch)
2003-11-23 05:57 EST, Mathias Nicolajsen Kjærgaard
no flags Details | Diff

  None (edit)
Description Mathias Nicolajsen Kjærgaard 2003-11-23 05:50:39 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)

Description of problem:
When logrotate on a fresh Fedora installation is cofigured to
"maillast", it will do a Segmentation fault, because the file to be
e-mail is not present. My /etc/logrotate.d/syslog:

/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler
/var/log/boot.log /var/log/cron {
    mail mnk@mnk.dk
        /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2>
/dev/null || true

This fails because only messages, messages.1, messages.2 is in /var/log.
messages.4 which logrote renames to messages.5 and send to mnk@mnk.dk
is missing.

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

How reproducible:

Steps to Reproduce:
1. Insert a "mail" statement in /etc/logrotate.d/syslog
2. Remove messages.4 from /var/log
3. Run logrotate with -f

Additional info:

/etc/cron.daily/logrotate: line 3: 18038 Segmentation fault     
/usr/sbin/logrotate /etc/logrotate.conf
Comment 1 Mathias Nicolajsen Kjærgaard 2003-11-23 05:57:09 EST
Created attachment 96145 [details]
This patch solves the probelm on my system

I am not sure if it is a good solution, but it seems to work.
Comment 2 Peter Vrabec 2004-12-10 04:37:38 EST
Problem already solved in logrotate-3.7.1.

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