Issues w/ timezones on gssftpd

Philip Prindeville philipp at redfish-solutions.com
Fri Nov 10 00:27:42 EST 2006


Doh.  That fix below doesn't work with daylight savings time.

Came up with a simpler fix.

Attached as a patch.

-Philip


Philip Prindeville wrote:

>And the winner is:
>
>***************
>*** 293,303 ****
>        int addrlen, c, on = 1, tos, port = -1;
>        extern char *optarg;
>        extern int optopt;
>  #ifdef KRB5_KRB4_COMPAT
>        char *option_string = "AaCcdElp:r:s:T:t:U:u:vw:";
>  #else /* !KRB5_KRB4_COMPAT */
>        char *option_string = "AaCcdElp:r:T:t:U:u:vw:";
>  #endif /* KRB5_KRB4_COMPAT */
>        ftpusers = _PATH_FTPUSERS_DEFAULT;
>
>  #ifdef KRB5_KRB4_COMPAT
>--- 293,306 ----
>        int addrlen, c, on = 1, tos, port = -1;
>        extern char *optarg;
>        extern int optopt;
>+ #if defined(__GLIBC__)
>+ 	char *tz;
>+ #endif
>  #ifdef KRB5_KRB4_COMPAT
>        char *option_string = "AaCcdElp:r:s:T:t:U:u:vw:";
>  #else /* !KRB5_KRB4_COMPAT */
>        char *option_string = "AaCcdElp:r:T:t:U:u:vw:";
>  #endif /* KRB5_KRB4_COMPAT */
>        ftpusers = _PATH_FTPUSERS_DEFAULT;
>
>  #ifdef KRB5_KRB4_COMPAT
>
>***************
>*** 536,541 ****
>--- 620,633 ----
>        if (fcntl(fileno(stdin), F_SETOWN, getpid()) == -1)
>                syslog(LOG_ERR, "fcntl F_SETOWN: %m");
>  #endif
>+
>+ #if defined(__GLIBC__)
>+       if ((tz = getenv("TZ")) == NULL) {
>+               tzset();
>+               setenv("TZ", tzname[0], 0);
>+       }
>+ #endif
>+
>        dolog(&his_addr);
>        /*
>         * Set up default state
>
>
>Can we slip this in?
>
>BTW:  No chance of my graylisting patch making it, huh?
>
>-Philip
>
>  
>

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: foo
Url: http://mailman.mit.edu/pipermail/krbdev/attachments/20061109/9aee2d67/attachment.bat


More information about the krbdev mailing list