bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"TZ" and chroot() jails


From: Philip Prindeville
Subject: "TZ" and chroot() jails
Date: Sat, 09 Dec 2006 00:21:18 -0700
User-agent: Mozilla Thunderbird 1.0.7-1.3.pp (X11/20060428)

Hi.

I had a question:  after calling tzset(), is there a reliable way
to format the values of tzname[], daylight, and timezone into
a string to pass to setenv("TZ", ...) so that following a chroot(),
strftime() and localtime() continue to generate the correct
values?

Because I noticed that if you call tzset(), then chroot(), and
then any subsequent calls to tzset() happen (I think that
syslog() calls strftime_r() which calls tzset()), then the
subsequent calls to tzset() will clobber the previously good
values.

It's unfortunate that tzset() isn't idempotent following
initial success.

Thanks,

-Philip





reply via email to

[Prev in Thread] Current Thread [Next in Thread]