X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/8bdc7aa07687ff35c3d31ff3e5c94c809792119e..aa56f760ea15248e3eeea92349bc5d0f27b053e3:/auth-pam.c diff --git a/auth-pam.c b/auth-pam.c index a67eaa30..c08d4722 100644 --- a/auth-pam.c +++ b/auth-pam.c @@ -54,6 +54,7 @@ #include #include +#include #include #include @@ -78,20 +79,24 @@ # 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 "bufaux.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; @@ -432,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]",