]> andersk Git - openssh.git/blobdiff - auth-pam.c
- (tim) [configure.ac] Move CHECK_HEADERS test before platform specific
[openssh.git] / auth-pam.c
index 8e9361caa796375de9e3aceeb437cdf4da90db75..c08d4722912da474a5a6b8951310b168d9c161c1 100644 (file)
@@ -54,6 +54,7 @@
 
 #include <errno.h>
 #include <signal.h>
+#include <stdarg.h>
 #include <string.h>
 #include <unistd.h>
 
@@ -436,10 +437,16 @@ sshpam_thread(void *ctxtp)
        u_int i;
        const char *pam_user;
        const char **ptr_pam_user = &pam_user;
+       char *tz = getenv("TZ");
 
        pam_get_item(sshpam_handle, PAM_USER,
            (sshpam_const void **)ptr_pam_user);
+
        environ[0] = NULL;
+       if (tz != NULL)
+               if (setenv("TZ", tz, 1) == -1)
+                       error("PAM: could not set TZ environment: %s",
+                           strerror(errno));
 
        if (sshpam_authctxt != NULL) {
                setproctitle("%s [pam]",
This page took 0.034197 seconds and 4 git commands to generate.