Bug 110683 - Logrotate throws Segmentation fault when doing "maillast" but no last-file is present
Summary: Logrotate throws Segmentation fault when doing "maillast" but no last-file is...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: logrotate
Version: 1
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Peter Vrabec
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-11-23 10:50 UTC by Mathias Nicolajsen Kjærgaard
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-12-10 09:37:38 UTC
Type: ---
Embargoed:


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

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

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
    sharedscripts
    postrotate
        /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2>
/dev/null || true
    endscript
}

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
is missing.

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


How reproducible:
Always

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 10:57:09 UTC
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 09:37:38 UTC
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.