Issues w/ timezones on gssftpd

Philip Prindeville philipp at redfish-solutions.com
Thu Nov 30 20:26:58 EST 2006


Russ Allbery wrote:

>Philip Prindeville <philipp at redfish-solutions.com> writes:
>
>  
>
>>So...  the "ANONYMOUS..." line is generated after the chroot, and has
>>the correct timezone.  But the two lines that follow didn't.
>>    
>>
>
>  
>
>>What was the theory about that again?
>>    
>>
>
>syslog calls strftime in the chroot, which calls tzset again, and tzset
>then runs inside the chroot, fails to find appropriate timezone
>configuration files, and resets the time zone to what you don't want.
>
>  
>


I thought (maybe I misread tzset()) that tzset() remembers if it's
already been called or not, and returns without doing anything
if it has previously run:

static void
internal_function
tzset_internal (always, explicit)
     int always;
     int explicit;
{
...

  if (is_initialized && !always)
    return;
  is_initialized = 1;

Ah... except that __tzset() calls it with "always == 1".

No idea why.

Which begs the question: why isn't tzset() $%^&* idempotent?

-Philip







More information about the krbdev mailing list