Date: Fri, 1 Feb 2002 18:05:32 +0200 From: Peter Pentchev <roam@ringlet.net> To: audit@FreeBSD.org Subject: CFR: a fix for newsyslog(8) -F Message-ID: <20020201180532.A1960@straylight.oblivion.bg>
next in thread | raw e-mail | index | archive | help
Hi,
newsyslog(8) seems to have a minor buglet in its forced processing
of logfiles for which date/time is the only rotate condition.
Due to a missed check for -F, it refuses to forcibly rotate them
if the time is not ripe yet.
Attached is a trivial patch.
G'luck,
Peter
--
Peter Pentchev roam@ringlet.net roam@FreeBSD.org
This sentence every third, but it still comprehensible.
Index: src/usr.sbin/newsyslog/newsyslog.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/newsyslog/newsyslog.c,v
retrieving revision 1.38
diff -u -r1.38 newsyslog.c
--- src/usr.sbin/newsyslog/newsyslog.c 14 Nov 2001 17:00:58 -0000 1.38
+++ src/usr.sbin/newsyslog/newsyslog.c 28 Jan 2002 17:23:10 -0000
@@ -159,7 +159,7 @@
if (verbose)
printf("does not exist.\n");
} else {
- if (ent->flags & CE_TRIMAT) {
+ if (ent->flags & CE_TRIMAT && !force) {
if (timenow < ent->trim_at
|| difftime(timenow, ent->trim_at) >= 60 * 60) {
if (verbose)
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020201180532.A1960>
