Date: Thu, 17 Jul 2008 14:12:30 +0100 From: Gavin Atkinson <gavin@FreeBSD.org> To: Arne =?ISO-8859-1?Q?W=F6rner?= <arne_woerner@yahoo.com> Cc: freebsd-bugs@FreeBSD.org Subject: Re: bin/100018: newsyslog(8) does not check size if time_at is used Message-ID: <1216300350.16407.24.camel@buffy.york.ac.uk> In-Reply-To: <608836.52903.qm@web30301.mail.mud.yahoo.com> References: <608836.52903.qm@web30301.mail.mud.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2008-07-17 at 05:34 -0700, Arne Wörner wrote:
> --- On Thu, 7/17/08, gavin@FreeBSD.org <gavin@FreeBSD.org> wrote:
> > - } else if (ent->hours <= 0 &&
> > (ent->flags & CE_TRIMAT)) {
> > + } else if ((ent->hours <= 0 &&
> > (ent->flags & CE_TRIMAT)) &&
> > + check_time_rotate) {
> >
> thx for ur effort...
> unfortunately i do not have any fbsd box currently...
>
> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1216300350.16407.24.camel>
