From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 10 16:56:09 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02360106566C for ; Sun, 10 Jul 2011 16:56:09 +0000 (UTC) (envelope-from lidl@hydra.pix.net) Received: from hydra.pix.net (hydra.pix.net [71.241.230.60]) by mx1.freebsd.org (Postfix) with ESMTP id B1FDC8FC12 for ; Sun, 10 Jul 2011 16:56:08 +0000 (UTC) Received: from hydra.pix.net (localhost [127.0.0.1]) by hydra.pix.net (8.14.4/8.14.4) with ESMTP id p6AGgsoE050872; Sun, 10 Jul 2011 12:42:54 -0400 (EDT) (envelope-from lidl@hydra.pix.net) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.97 at mail.pix.net Received: (from lidl@localhost) by hydra.pix.net (8.14.4/8.14.4/Submit) id p6AGgqFl050871; Sun, 10 Jul 2011 12:42:52 -0400 (EDT) (envelope-from lidl) Date: Sun, 10 Jul 2011 12:42:52 -0400 From: Kurt Lidl To: Warner Losh Message-ID: <20110710164252.GA50703@pix.net> References: <4E11ECE2.9050402@freebsd.org> <55627D64-E412-4D04-AA17-3D912EEE6589@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55627D64-E412-4D04-AA17-3D912EEE6589@bsdimp.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@freebsd.org, grarpamp Subject: Re: Jails: Setting different times in jails X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jul 2011 16:56:09 -0000 On Sat, Jul 09, 2011 at 11:19:23PM -0600, Warner Losh wrote: > Why on earth would you want this? Oh, it's not hard to imagine why you want to do this. Say you're testing a particular date rollover event, and want to make sure your software is up to snuff. Doing it in a jail would make it easy to do it. I hacked over a unix kernel to do this for Y2K testing, along with the company's mandatory 9/9/99 testing (and we extended it through to 1-Mar-2000 just to be thorough). In that case, not only did I just start the systems with a clock value of 9/8/99, I hacked it so the time was incremented by one second at each hardclock, rather than 1/100 of a second. So my applications saw every second of every "day" between 9/8/99 and 3/1/00. (Remember that 28-Feb-2000 went straight through to 1-Mar-2000 -- 2000 was NOT a leap year!) Heck, maybe if this got put in, Apple would pick it up and finally make the calandering stuff in OS X not fail every daylight savings time. Nah, I'm just dreaming now... -Kurt > On Jul 7, 2011, at 2:31 AM, grarpamp wrote: > > >> possibly achievable in libc? > > > > I don't know. Where else would it be done? > > stat, utimes, gettimeofday, clock_gettime, > > adjtime, etc and their variations. > > > > I've not checked what currently happens, but I > > don't think root in a jail should be able to set > > any kernel time parameters, absent a syscall > > that says it should. > > > >> in any case file this idea somewhere.. :-) > > > > Don't know here either. I looked at the lists and > > hackers seemed closest. I'll bcc current. Someone > > could maybe todo-wiki this thread as low hanging > > fruit. Cheers. > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > > > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"