diff options
author | Darren Tucker <dtucker@zip.com.au> | 2003-08-08 13:43:37 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2003-08-08 13:43:37 +1000 |
commit | f38db7f5dae83b5aeeab681edd266a62b3ebc1f6 (patch) | |
tree | 03d78b6d7cabeeb73021322d9f6c346228dd6a4b | |
parent | 65914f1eb3e05694d64e540ff1bf3b8387795657 (diff) |
- (dtucker) [auth-pam.c] Don't set PAM_TTY if tty is null. ok djm@
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | auth-pam.c | 14 |
2 files changed, 10 insertions, 7 deletions
@@ -2,6 +2,7 @@ | |||
2 | - (dtucker) [openbsd-compat/fake-rfc2553.h] Older Linuxes have AI_PASSIVE and | 2 | - (dtucker) [openbsd-compat/fake-rfc2553.h] Older Linuxes have AI_PASSIVE and |
3 | AI_CANONNAME in netdb.h but not AI_NUMERICHOST, so check each definition | 3 | AI_CANONNAME in netdb.h but not AI_NUMERICHOST, so check each definition |
4 | separately before defining them. | 4 | separately before defining them. |
5 | - (dtucker) [auth-pam.c] Don't set PAM_TTY if tty is null. ok djm@ | ||
5 | 6 | ||
6 | 20030807 | 7 | 20030807 |
7 | - (dtucker) [session.c] Have session_break_req not attempt to send a break | 8 | - (dtucker) [session.c] Have session_break_req not attempt to send a break |
@@ -803,4 +804,4 @@ | |||
803 | - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. | 804 | - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. |
804 | Report from murple@murple.net, diagnosis from dtucker@zip.com.au | 805 | Report from murple@murple.net, diagnosis from dtucker@zip.com.au |
805 | 806 | ||
806 | $Id: ChangeLog,v 1.2885 2003/08/08 02:15:11 dtucker Exp $ | 807 | $Id: ChangeLog,v 1.2886 2003/08/08 03:43:37 dtucker Exp $ |
diff --git a/auth-pam.c b/auth-pam.c index 9ca18e77e..970ff61cb 100644 --- a/auth-pam.c +++ b/auth-pam.c | |||
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | /* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */ | 32 | /* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */ |
33 | #include "includes.h" | 33 | #include "includes.h" |
34 | RCSID("$Id: auth-pam.c,v 1.65 2003/07/30 04:53:11 djm Exp $"); | 34 | RCSID("$Id: auth-pam.c,v 1.66 2003/08/08 03:43:37 dtucker Exp $"); |
35 | 35 | ||
36 | #ifdef USE_PAM | 36 | #ifdef USE_PAM |
37 | #include <security/pam_appl.h> | 37 | #include <security/pam_appl.h> |
@@ -534,11 +534,13 @@ do_pam_session(const char *user, const char *tty) | |||
534 | if (sshpam_err != PAM_SUCCESS) | 534 | if (sshpam_err != PAM_SUCCESS) |
535 | fatal("PAM: failed to set PAM_CONV: %s", | 535 | fatal("PAM: failed to set PAM_CONV: %s", |
536 | pam_strerror(sshpam_handle, sshpam_err)); | 536 | pam_strerror(sshpam_handle, sshpam_err)); |
537 | debug("PAM: setting PAM_TTY to \"%s\"", tty); | 537 | if (tty != NULL) { |
538 | sshpam_err = pam_set_item(sshpam_handle, PAM_TTY, tty); | 538 | debug("PAM: setting PAM_TTY to \"%s\"", tty); |
539 | if (sshpam_err != PAM_SUCCESS) | 539 | sshpam_err = pam_set_item(sshpam_handle, PAM_TTY, tty); |
540 | fatal("PAM: failed to set PAM_TTY: %s", | 540 | if (sshpam_err != PAM_SUCCESS) |
541 | pam_strerror(sshpam_handle, sshpam_err)); | 541 | fatal("PAM: failed to set PAM_TTY: %s", |
542 | pam_strerror(sshpam_handle, sshpam_err)); | ||
543 | } | ||
542 | sshpam_err = pam_open_session(sshpam_handle, 0); | 544 | sshpam_err = pam_open_session(sshpam_handle, 0); |
543 | if (sshpam_err != PAM_SUCCESS) | 545 | if (sshpam_err != PAM_SUCCESS) |
544 | fatal("PAM: pam_open_session(): %s", | 546 | fatal("PAM: pam_open_session(): %s", |