Bug 129551 - logrotate does not pass log file name to pre/postrotate scripts
logrotate does not pass log file name to pre/postrotate scripts
Status: CLOSED DUPLICATE of bug 126490
Product: Fedora
Classification: Fedora
Component: logrotate (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Cristian Gafton
Depends On:
  Show dependency treegraph
Reported: 2004-08-10 07:02 EDT by Andreas Karrer
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: 2006-02-21 14:05:03 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Andreas Karrer 2004-08-10 07:02:55 EDT
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 07:07:58 EDT
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 12:50:24 EDT

*** This bug has been marked as a duplicate of 126490 ***
Comment 3 Red Hat Bugzilla 2006-02-21 14:05:03 EST
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.