Move tzset() call from sudoers plugin to sudo front end.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 7 Feb 2013 19:31:48 +0000 (14:31 -0500)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 7 Feb 2013 19:31:48 +0000 (14:31 -0500)
plugins/sudoers/sudoers.c
src/sudo.c

index 392aa5186696d9c3e817a65a0b5c3d12725707db..f8d4b5eaf8f26c6364608fb39d11b9043200c5a9 100644 (file)
@@ -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++) {
index c19244e79d609ce16cd19d3a75b473180c762671..9823e2cea23b9e50c6b1b790e3371a490d1fdb54 100644 (file)
@@ -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);