Date: Sun, 10 Jul 2011 12:42:52 -0400 From: Kurt Lidl <lidl@pix.net> To: Warner Losh <imp@bsdimp.com> Cc: freebsd-hackers@freebsd.org, grarpamp <grarpamp@gmail.com> Subject: Re: Jails: Setting different times in jails Message-ID: <20110710164252.GA50703@pix.net> In-Reply-To: <55627D64-E412-4D04-AA17-3D912EEE6589@bsdimp.com> References: <CAD2Ti2-55tQqjSmWbMr6OCXg8X5Mhbw%2Btpe87FM%2Bn%2BKzjUVyNQ@mail.gmail.com> <4E11ECE2.9050402@freebsd.org> <CAD2Ti2_GM%2ByT3HNx%2B20xHL0UdnkUbUAoFN64txxHoUkJAkLFXA@mail.gmail.com> <55627D64-E412-4D04-AA17-3D912EEE6589@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110710164252.GA50703>