From: Todd C. Miller Date: Thu, 7 Feb 2013 19:31:48 +0000 (-0500) Subject: Move tzset() call from sudoers plugin to sudo front end. X-Git-Tag: SUDO_1_8_7~1^2~240 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=af0bb55283b8de2a8a0a928eb985e1feba85e689;p=sudo Move tzset() call from sudoers plugin to sudo front end. --- diff --git a/plugins/sudoers/sudoers.c b/plugins/sudoers/sudoers.c index 392aa5186..f8d4b5eaf 100644 --- a/plugins/sudoers/sudoers.c +++ b/plugins/sudoers/sudoers.c @@ -527,10 +527,6 @@ init_vars(char * const envp[]) char * const * ep; debug_decl(init_vars, SUDO_DEBUG_PLUGIN) -#ifdef HAVE_TZSET - (void) tzset(); /* set the timezone if applicable */ -#endif /* HAVE_TZSET */ - sudoers_initlocale(setlocale(LC_ALL, NULL), def_sudoers_locale); for (ep = envp; *ep; ep++) { diff --git a/src/sudo.c b/src/sudo.c index c19244e79..9823e2cea 100644 --- a/src/sudo.c +++ b/src/sudo.c @@ -156,6 +156,10 @@ main(int argc, char *argv[], char *envp[]) bindtextdomain(PACKAGE_NAME, LOCALEDIR); textdomain(PACKAGE_NAME); +#ifdef HAVE_TZSET + (void) tzset(); +#endif /* HAVE_TZSET */ + /* Must be done before we do any password lookups */ #if defined(HAVE_GETPRPWNAM) && defined(HAVE_SET_AUTH_PARAMETERS) (void) set_auth_parameters(argc, argv);