bin/51519: newsyslog handles bzip2-compressed files incorrectly
Peter Grimshaw
peter at tesseract.demon.co.uk
Mon Apr 28 13:50:13 PDT 2003
>Number: 51519
>Category: bin
>Synopsis: newsyslog handles bzip2-compressed files incorrectly
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Apr 28 13:50:11 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Peter Grimshaw
>Release: FreeBSD 5.0-RELEASE i386
>Organization:
N/A
>Environment:
System: FreeBSD tesseract.demon.co.uk 5.0-RELEASE FreeBSD 5.0-RELEASE #0: Fri Mar 7 15:46:41 GMT 2003 peter at tesseract.demon.co.uk:/usr/obj/usr/src/sys/TESSERACT i386
>Description:
Function age_old_log in /usr/src/usr.sbin/newsyslog/newsyslog.c does
not check for a .bz2 file name suffix on the old log file name. This
causes time-based rotation of bzip2-compressed log files to work
incorrectly - a new log is started each time newsyslog is run.
>How-To-Repeat:
In /etc/newsyslog.conf specify a 'when' value of, say, 168 and a '[ZJB]'
value of J. This causes newsyslog to unconditionally start a new log
file, rather than weekly as you would expect.
>Fix:
Make function age_old_log also check for a .bz2 suffix on the old log
file name.
A workaround is to switch to gzip compression for old log files.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list