diff options
author | Darren Tucker <dtucker@zip.com.au> | 2006-09-17 11:57:46 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2006-09-17 11:57:46 +1000 |
commit | 54e1b2291cf5fcd96ba36d291e6543eab44ec4dd (patch) | |
tree | 51eef2ca6c456b0b05018c29a371b682cbde11f9 | |
parent | dd1f9b307eb0ab746a9cbd391511dbf646f29210 (diff) |
- (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@.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | auth-pam.c | 6 |
2 files changed, 10 insertions, 1 deletions
@@ -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 $ @@ -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]", |