summaryrefslogtreecommitdiff
path: root/auth-pam.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth-pam.c')
-rw-r--r--auth-pam.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/auth-pam.c b/auth-pam.c
index 493993a10..c08d47229 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -437,10 +437,16 @@ sshpam_thread(void *ctxtp)
437 u_int i; 437 u_int i;
438 const char *pam_user; 438 const char *pam_user;
439 const char **ptr_pam_user = &pam_user; 439 const char **ptr_pam_user = &pam_user;
440 char *tz = getenv("TZ");
440 441
441 pam_get_item(sshpam_handle, PAM_USER, 442 pam_get_item(sshpam_handle, PAM_USER,
442 (sshpam_const void **)ptr_pam_user); 443 (sshpam_const void **)ptr_pam_user);
444
443 environ[0] = NULL; 445 environ[0] = NULL;
446 if (tz != NULL)
447 if (setenv("TZ", tz, 1) == -1)
448 error("PAM: could not set TZ environment: %s",
449 strerror(errno));
444 450
445 if (sshpam_authctxt != NULL) { 451 if (sshpam_authctxt != NULL) {
446 setproctitle("%s [pam]", 452 setproctitle("%s [pam]",