From owner-freebsd-questions Wed Jan 16 12: 2:58 2002 Delivered-To: freebsd-questions@freebsd.org Received: from scaup.prod.itd.earthlink.net (scaup.mail.pas.earthlink.net [207.217.120.49]) by hub.freebsd.org (Postfix) with ESMTP id 09E8537B405; Wed, 16 Jan 2002 12:02:51 -0800 (PST) Received: from pool0454.cvx21-bradley.dialup.earthlink.net ([209.179.193.199] helo=mindspring.com) by scaup.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16QwGo-0004Po-00; Wed, 16 Jan 2002 12:02:50 -0800 Message-ID: <3C45DC67.D92C32B9@mindspring.com> Date: Wed, 16 Jan 2002 12:02:47 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: "Crist J . Clark" Cc: FreeBSD@jovi.net, freebsd-questions@FreeBSD.ORG, freebsd-arch@FreeBSD.ORG, bug-followup@FreeBSD.ORG Subject: Re: kern/33904: secure mode bug References: <200201152003.g0FK3gb04767@grant.org> <20020115210303.E31328@blossom.cjclark.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "Crist J . Clark" wrote: > On Tue, Jan 15, 2002 at 03:03:42PM -0500, FreeBSD@jovi.net wrote: > > or better yet > > fix settimeofday to return EPERM instead of trying > > to second-guess the intent of the programmer. > > That might be a valid option. Would you be willing to patch settime() > (in sys/kern/kern_time.c)? Would you be willing to test patches to see > if they don't break things even worse? Bad idea. Specifically, the clamping doesn't prevent small deltas from being applied, and it does not prevent larger deltas from being applied iteratively in order to actually get a larger delta. This means that a delta of several minutes *will* eventually cause the clock to slowly approach the correct value, until it is eventually correct. Returning an error all the time wouldn't let this happen, since you would prevent, not clam, the adjustment. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message