]> andersk Git - openssh.git/commitdiff
- (dtucker) [auth-pam.c] Propogate TZ environment variable to PAM auth
authordtucker <dtucker>
Sun, 17 Sep 2006 01:57:46 +0000 (01:57 +0000)
committerdtucker <dtucker>
Sun, 17 Sep 2006 01:57:46 +0000 (01:57 +0000)
   process so that any logging it does is with the right timezone.  From
   Scott Strickler, ok djm@.

ChangeLog
auth-pam.c

index 994c293648b0ec823605c3348ae0fc71e83c9091..bd47ad48baf7c22316077a3085851d2075950fc6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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]
index 493993a10d1c6699dd3709c0b44f7386016640c4..c08d4722912da474a5a6b8951310b168d9c161c1 100644 (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]",
This page took 0.074155 seconds and 5 git commands to generate.