From owner-freebsd-bugs@FreeBSD.ORG Thu Jul 17 13:48:48 2008 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D2E01065671 for ; Thu, 17 Jul 2008 13:48:48 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from mail-gw2.york.ac.uk (mail-gw2.york.ac.uk [144.32.128.247]) by mx1.freebsd.org (Postfix) with ESMTP id D96E98FC22 for ; Thu, 17 Jul 2008 13:48:47 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from mail-gw7.york.ac.uk (mail-gw7.york.ac.uk [144.32.129.30]) by mail-gw2.york.ac.uk (8.13.6/8.13.6) with ESMTP id m6HDCV28012952; Thu, 17 Jul 2008 14:12:31 +0100 (BST) Received: from buffy-128.york.ac.uk ([144.32.128.160] helo=buffy.york.ac.uk) by mail-gw7.york.ac.uk with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1KJTHb-0001fg-8v; Thu, 17 Jul 2008 14:12:31 +0100 Received: from buffy.york.ac.uk (localhost [127.0.0.1]) by buffy.york.ac.uk (8.14.2/8.14.2) with ESMTP id m6HDCUR0016910; Thu, 17 Jul 2008 14:12:30 +0100 (BST) (envelope-from gavin@FreeBSD.org) Received: (from ga9@localhost) by buffy.york.ac.uk (8.14.2/8.14.2/Submit) id m6HDCUYb016909; Thu, 17 Jul 2008 14:12:30 +0100 (BST) (envelope-from gavin@FreeBSD.org) X-Authentication-Warning: buffy.york.ac.uk: ga9 set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson To: Arne =?ISO-8859-1?Q?W=F6rner?= In-Reply-To: <608836.52903.qm@web30301.mail.mud.yahoo.com> References: <608836.52903.qm@web30301.mail.mud.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: Thu, 17 Jul 2008 14:12:30 +0100 Message-Id: <1216300350.16407.24.camel@buffy.york.ac.uk> Mime-Version: 1.0 X-Mailer: Evolution 2.22.2 FreeBSD GNOME Team Port X-York-MailScanner: Found to be clean X-York-MailScanner-From: gavin@freebsd.org Cc: freebsd-bugs@FreeBSD.org Subject: Re: bin/100018: newsyslog(8) does not check size if time_at is used X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jul 2008 13:48:48 -0000 On Thu, 2008-07-17 at 05:34 -0700, Arne W=F6rner wrote: > --- On Thu, 7/17/08, gavin@FreeBSD.org wrote: > > - } else if (ent->hours <=3D 0 && > > (ent->flags & CE_TRIMAT)) { > > + } else if ((ent->hours <=3D 0 && > > (ent->flags & CE_TRIMAT)) && > > + check_time_rotate) { > > > thx for ur effort... > unfortunately i do not have any fbsd box currently... >=20 > but i did a lazy code inspection and think, that it looks ok... > but: > } else if ((ent->flags & CE_TRIMAT) && check_time_rotate) { > should suffice, since "check_time_rotate" cant become 1 if "ent->hours > > 0" or can it? not really sure... :) You are correct, it cannot become 1 unless "ent->hours > 0", however "ent->hours > 0" can be true without check_time_rotate becoming 1. It's quite a hard piece of code to understand, but I've tested it extensively and can't make it misbehave. Thanks for looking! Gaivn