Your message dated Mon, 16 May 2005 18:32:03 -0400 with message-id <[EMAIL PROTECTED]> and subject line Bug#276172: fixed in logrotate 3.7-3 has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what I am talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) Debian bug tracking system administrator (administrator, Debian Bugs database) -------------------------------------- Received: (at submit) by bugs.debian.org; 12 Oct 2004 13:23:09 +0000 >From [EMAIL PROTECTED] Tue Oct 12 06:23:09 2004 Return-path: <[EMAIL PROTECTED]> Received: from kynogon.net2.nerim.net (arsenic.daysofwonder.com) [62.212.112.82] by spohr.debian.org with esmtp (Exim 3.35 1 (Debian)) id 1CHMcP-0000yQ-00; Tue, 12 Oct 2004 06:23:09 -0700 Received: by arsenic.daysofwonder.com (Postfix, from userid 1000) id 92AB51800E6; Tue, 12 Oct 2004 15:22:37 +0200 (CEST) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Brice Figureau <[EMAIL PROTECTED]> To: Debian Bug Tracking System <[EMAIL PROTECTED]> Subject: logrotate: Pre/post rotate scripts don't get the log filenames as argument X-Mailer: reportbug 2.63 Date: Tue, 12 Oct 2004 15:22:37 +0200 Message-Id: <[EMAIL PROTECTED]> X-BadReturnPath: [EMAIL PROTECTED] rewritten as [EMAIL PROTECTED] using "From" header Delivered-To: [EMAIL PROTECTED] X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 (1.212-2003-09-23-exp) on spohr.debian.org X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE autolearn=no version=2.60-bugs.debian.org_2004_03_25 X-Spam-Level: Package: logrotate Version: 3.7-2 Severity: important Tags: patch I'm using the following file for rotating syslogs log files (instead of what is installed by sysklogd): /var/log/kern.log /var/log/daemon.log /var/log/user.log /var/log/uucp.log /var/log/debug /var/log/lpr.log /var/log/user.log /var/log/loginlog /var/log/auth.log /var/log/messages /var/log/syslog { prerotate for file in $@ do /usr/bin/chattr -a $file done endscript compress create 640 root adm sharedscripts postrotate /usr/bin/killall -HUP syslogd for file in $@ do /usr/bin/chattr +a $file done endscript } Upon execution of the pre or post rotate scripts "$@" is empty and never replaced by the log filenames, thus the rotate scripts can't chattr them. The problem appeared with 3.7-1. This does not seem to be related to #252197. In fact it has been introduced with the following upstream change: * New upstream release: + Compression and scripts don't use system() anymore Upstream author now uses execlp(2) to execute the shell script (after it has been chmoded to 700). Unfortunately the first argument propagated to the shell script by execlp should be the script name, otherwise it is eaten (thus as it was the log file names that were sent, they are not propagated to the script). The following patch solves the problem for me: --- logrotate.c.orig 2004-10-12 14:57:19.000000000 +0200 +++ logrotate.c 2004-10-12 14:57:32.000000000 +0200 @@ -110,7 +110,7 @@ close(fd); if (!fork()) { - execlp(filespec, logfn, NULL); + execlp(filespec, filespec, logfn, (char*)0); exit(1); } -- Package-specific info: Contents of /etc/logrotate.d total 60 -rw-r--r-- 1 root root 240 2004-04-04 16:48 apache2 -rw-r--r-- 1 root root 79 2004-02-16 17:49 aptitude -rw-r--r-- 1 root root 384 2004-06-12 19:04 base-config -rw-r--r-- 1 root root 211 2004-06-06 21:40 clamav-freshclam -rw-r--r-- 1 root root 171 2004-08-04 11:40 cupsys -rw-r--r-- 1 root root 170 2004-04-26 09:57 exim4-base -rw-r--r-- 1 root root 1208 2004-08-18 23:07 mailman -rw-r--r-- 1 root root 973 2004-09-30 11:30 mysql-server -rw-r--r-- 1 root root 136 2004-04-22 15:14 postgresql -rw-r--r-- 1 root root 138 2004-04-22 15:14 postgresql-contrib -rw-r--r-- 1 root root 94 2004-04-15 20:21 ppp -rw-r--r-- 1 root root 328 2004-02-24 16:53 samba -rw-r--r-- 1 root root 68 2004-04-17 02:24 scrollkeeper -rw-r--r-- 1 root root 173 2004-07-27 10:38 sympa -rw-r--r-- 1 root root 134 2004-07-12 06:08 vsftpd -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.8.1 Locale: LANG=en_US, LC_CTYPE=en_US Versions of packages logrotate depends on: ii base-passwd 3.5.7 Debian base system master password ii cron 3.0pl1-86 management of regular background p ii libc6 2.3.2.ds1-16 GNU C Library: Shared libraries an ii libpopt0 1.7-4 lib for parsing cmdline parameters -- no debconf information -- Brice Figureau --------------------------------------- Received: (at 276172-close) by bugs.debian.org; 16 May 2005 22:41:43 +0000 >From [EMAIL PROTECTED] Mon May 16 15:41:43 2005 Return-path: <[EMAIL PROTECTED]> Received: from newraff.debian.org [208.185.25.31] (mail) by spohr.debian.org with esmtp (Exim 3.35 1 (Debian)) id 1DXoHP-0004FY-00; Mon, 16 May 2005 15:41:43 -0700 Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian)) id 1DXo83-0000VD-00; Mon, 16 May 2005 18:32:03 -0400 From: Paul Martin <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] X-Katie: $Revision: 1.55 $ Subject: Bug#276172: fixed in logrotate 3.7-3 Message-Id: <[EMAIL PROTECTED]> Sender: Archive Administrator <[EMAIL PROTECTED]> Date: Mon, 16 May 2005 18:32:03 -0400 Delivered-To: [EMAIL PROTECTED] X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 (1.212-2003-09-23-exp) on spohr.debian.org X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER autolearn=no version=2.60-bugs.debian.org_2005_01_02 X-Spam-Level: X-CrossAssassin-Score: 5 Source: logrotate Source-Version: 3.7-3 We believe that the bug you reported is fixed in the latest version of logrotate, which is due to be installed in the Debian FTP archive: logrotate_3.7-3.diff.gz to pool/main/l/logrotate/logrotate_3.7-3.diff.gz logrotate_3.7-3.dsc to pool/main/l/logrotate/logrotate_3.7-3.dsc logrotate_3.7-3_i386.deb to pool/main/l/logrotate/logrotate_3.7-3_i386.deb A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to [EMAIL PROTECTED], and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Paul Martin <[EMAIL PROTECTED]> (supplier of updated logrotate package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing [EMAIL PROTECTED]) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Format: 1.7 Date: Mon, 16 May 2005 23:01:32 +0100 Source: logrotate Binary: logrotate Architecture: source i386 Version: 3.7-3 Distribution: unstable Urgency: high Maintainer: Paul Martin <[EMAIL PROTECTED]> Changed-By: Paul Martin <[EMAIL PROTECTED]> Description: logrotate - Log rotation utility Closes: 272716 276172 278172 290628 308172 Changes: logrotate (3.7-3) unstable; urgency=high . * 41-execlp-fix: "critical" bug with execlp() call on scripts. This affects only those who use the undocumented feature of the arguments of the script being the files that are being rotated. Oh rats... I've just documented it! (Closes: #276172) Thanks to Lars for the quick NMU. . The rest of the changes are minor and are mainly to documentation: . * Depend on cron | anacron | fcron. (Closes: #308172) * 52-man-sizetypo.dpatch fixes "size=100k" typo in manpage. Thanks to Ged Haywood for spotting this. Also spotted by Kjetil Kjernsmo (Closes: #272716) * 52-man-lastaction.dpatch fixes mistake in the lastaction description. (Closes: #278172) * Credit some of the RedHat authors in the debian/copyright file, and update the location of the cvs repository. * 52-man-startcount.dpatch, fixes manpage for "start" description. (Closes: #290628) Files: 52a1d76d8cb0b1b586a233eec5d345a2 574 admin important logrotate_3.7-3.dsc d7ed79add004212bcdc772467029871a 14223 admin important logrotate_3.7-3.diff.gz 819899b909373772140d45d3cf3ed990 32142 admin important logrotate_3.7-3_i386.deb -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCiRuF+gi+rt7UWRIRAp1WAJ9BX5VDofRF/TICgEjDCgVrdFJ/VQCeM+9W VtE2v1N1wQblIVsR3XxhIDk= =stlM -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]