This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PING^2] RFC [PATCH] BZ#1077902: New API gettimezone


> On Thursday, 1 May 2014 11:52 AM, Paul Eggert wrote:

> But there is a programmatic API, namely getenv ("TZ").

  It requires that TZ is defined and exported on the host. Currently not done by default. And since TZ is not defined, we need a way to determine current system time zone as identified by '/etc/localtime'.

> If the chrooted files are identical, and if the TZ value (or lack of value) is 
> propagated into the chrooted process, localtime should behave the same 
> way inside the chrooted jail as it does outside.

  If '/etc/localtime' is accessible inside chroot(2) jail, there is no need to set TZ variable.

> That is, it's not necessary to set TZ to the same string both inside and 
> outside the jail.  All that's necessary is that if TZ is set outside the 
> jail, it must be set to the same value inside the jail, and vice versa.

  If TZ is set outside the jail, why wouldn't it be accessible inside the jail?

The whole issue exists because TZ is not set by default. And even if you set it to 'TZ=Region/City' format, it requires that the said file is accessible inside chroot(2) jail, which is not always possible.

---
Regards
   -Prasad
http://feedmug.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]