Skip site navigation (1)Skip section navigation (2)
Date:      28 Apr 2003 20:41:17 -0000
From:      Peter Grimshaw <peter@tesseract.demon.co.uk>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/51519: newsyslog handles bzip2-compressed files incorrectly
Message-ID:  <20030428204117.1428.qmail@tesseract.demon.co.uk>
Resent-Message-ID: <200304282050.h3SKoCdp084657@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030428204117.1428.qmail>