- (dtucker) [auth-pam.c] Propogate TZ environment variable to PAM auth

process so that any logging it does is with the right timezone.  From
   Scott Strickler, ok djm@.
This commit is contained in:
Darren Tucker 2006-09-17 11:57:46 +10:00
parent dd1f9b307e
commit 54e1b2291c
2 changed files with 10 additions and 1 deletions

View File

@ -6,6 +6,9 @@
problem reported by Tavis Ormandy, Google Security Team;
ok markus@ deraadt@
- (djm) Add openssh.xml to .cvsignore and sort it
- (dtucker) [auth-pam.c] Propogate TZ environment variable to PAM auth
process so that any logging it does is with the right timezone. From
Scott Strickler, ok djm@.
20060912
- (djm) [Makefile.in buildpkg.sh.in configure.ac openssh.xml.in]
@ -5442,4 +5445,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
$Id: ChangeLog,v 1.4546 2006/09/16 22:05:03 djm Exp $
$Id: ChangeLog,v 1.4547 2006/09/17 01:57:46 dtucker Exp $

View File

@ -437,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]",