Bug 129551 - logrotate does not pass log file name to pre/postrotate scripts
Summary: logrotate does not pass log file name to pre/postrotate scripts
Status: CLOSED DUPLICATE of bug 126490
Alias: None
Product: Fedora
Classification: Fedora
Component: logrotate (Show other bugs)
(Show other bugs)
Version: 2
Hardware: All Linux
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2004-08-10 11:02 UTC by Andreas Karrer
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-21 19:05:03 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Andreas Karrer 2004-08-10 11:02:55 UTC
Description of problem:
logrotate-3.6 passed the name of the script to rotate as argument 1
to the pre/postrotate scripts. 3.7 does not do that anymore

between logrotate 3.6 and 3.7, system() calls were replaced
by a runScript() routine which uses execlp(). It calls execlp wrongly.

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

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:

Comment 1 Andreas Karrer 2004-08-10 11:07:58 UTC
The second argument of execlp is argv0, the name of the process.
The log file name to be passted to the pre/postrotate script should
be passed as the *3rd* argument.

--- logrotate.c.orig    2004-01-26 21:08:04.000000000 +0100
+++ logrotate.c 2004-08-10 13:07:24.000000000 +0200
@@ -110,7 +110,7 @@
     if (!fork()) {
-       execlp(filespec, logfn, NULL);
+       execlp(filespec, filespec, logfn, NULL);

Comment 2 Miloslav Trmač 2004-10-19 16:50:24 UTC

*** This bug has been marked as a duplicate of 126490 ***

Comment 3 Red Hat Bugzilla 2006-02-21 19:05:03 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

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