]> andersk Git - openssh.git/blobdiff - auth-pam.c
20070326
[openssh.git] / auth-pam.c
index 6951984930fcec86aa2daa6ae0de2de4831a6754..c08d4722912da474a5a6b8951310b168d9c161c1 100644 (file)
@@ -54,6 +54,7 @@
 
 #include <errno.h>
 #include <signal.h>
+#include <stdarg.h>
 #include <string.h>
 #include <unistd.h>
 
 # define PAM_MSG_MEMBER(msg, n, member) ((msg)[(n)]->member)
 #endif
 
+#include "xmalloc.h"
+#include "buffer.h"
+#include "key.h"
+#include "hostfile.h"
 #include "auth.h"
 #include "auth-pam.h"
-#include "buffer.h"
 #include "canohost.h"
 #include "log.h"
-#include "monitor_wrap.h"
 #include "msg.h"
 #include "packet.h"
 #include "misc.h"
 #include "servconf.h"
 #include "ssh2.h"
-#include "xmalloc.h"
 #include "auth-options.h"
+#ifdef GSSAPI
+#include "ssh-gss.h"
+#endif
+#include "monitor_wrap.h"
 
 extern ServerOptions options;
 extern Buffer loginmsg;
@@ -431,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.039341 seconds and 4 git commands to generate.