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): logrotate-3.7-4 How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
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 @@ close(fd); if (!fork()) { - execlp(filespec, logfn, NULL); + execlp(filespec, filespec, logfn, NULL); exit(1); }
*** This bug has been marked as a duplicate of 126490 ***
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.