]> andersk Git - openssh.git/commitdiff
- (dtucker) [auth-pam.c] Don't set PAM_TTY if tty is null. ok djm@
authordtucker <dtucker>
Fri, 8 Aug 2003 03:43:37 +0000 (03:43 +0000)
committerdtucker <dtucker>
Fri, 8 Aug 2003 03:43:37 +0000 (03:43 +0000)
ChangeLog
auth-pam.c

index 316633c239d9af25b6ce40703699ec79e5ef71fa..611abaa7fbfe51c9ba41ef5d348bbaf882247f8b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
  - (dtucker) [openbsd-compat/fake-rfc2553.h] Older Linuxes have AI_PASSIVE and
    AI_CANONNAME in netdb.h but not AI_NUMERICHOST, so check each definition
    separately before defining them.
+ - (dtucker) [auth-pam.c] Don't set PAM_TTY if tty is null.  ok djm@
 
 20030807
  - (dtucker) [session.c] Have session_break_req not attempt to send a break
index a613f6dd43683137484324ba8bd53e7712c9249e..30f0004851ff1d063f1c7c2a5a164b5099b6db7a 100644 (file)
@@ -534,11 +534,13 @@ do_pam_session(const char *user, const char *tty)
        if (sshpam_err != PAM_SUCCESS)
                fatal("PAM: failed to set PAM_CONV: %s",
                    pam_strerror(sshpam_handle, sshpam_err));
-       debug("PAM: setting PAM_TTY to \"%s\"", tty);
-       sshpam_err = pam_set_item(sshpam_handle, PAM_TTY, tty);
-       if (sshpam_err != PAM_SUCCESS)
-               fatal("PAM: failed to set PAM_TTY: %s",
-                   pam_strerror(sshpam_handle, sshpam_err));
+       if (tty != NULL) {
+               debug("PAM: setting PAM_TTY to \"%s\"", tty);
+               sshpam_err = pam_set_item(sshpam_handle, PAM_TTY, tty);
+               if (sshpam_err != PAM_SUCCESS)
+                       fatal("PAM: failed to set PAM_TTY: %s",
+                           pam_strerror(sshpam_handle, sshpam_err));
+       }
        sshpam_err = pam_open_session(sshpam_handle, 0);
        if (sshpam_err != PAM_SUCCESS)
                fatal("PAM: pam_open_session(): %s",
This page took 0.312598 seconds and 5 git commands to generate.