Jails: Setting different times in jails
Kurt Lidl
lidl at pix.net
Sun Jul 10 16:56:09 UTC 2011
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 at freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
> >
> >
>
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
More information about the freebsd-hackers
mailing list