diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | auth-pam.c | 10 |
2 files changed, 7 insertions, 5 deletions
@@ -3,6 +3,8 @@ | |||
3 | prevents configure complaining on older BSDs. | 3 | prevents configure complaining on older BSDs. |
4 | - (dtucker [contrib/cygwin/ssh-{host,user}-config] Add license text. Patch | 4 | - (dtucker [contrib/cygwin/ssh-{host,user}-config] Add license text. Patch |
5 | from Corinna Vinschen. | 5 | from Corinna Vinschen. |
6 | - (dtucker) [auth-pam.c] Bug #1534: move the deletion of PAM credentials on | ||
7 | logout to after the session close. Patch from Anicka Bernathova, ok djm. | ||
6 | 8 | ||
7 | 20090707 | 9 | 20090707 |
8 | - (dtucker) [contrib/cygwin/ssh-host-config] better support for automated | 10 | - (dtucker) [contrib/cygwin/ssh-host-config] better support for automated |
diff --git a/auth-pam.c b/auth-pam.c index ccdb9937e..675006e6f 100644 --- a/auth-pam.c +++ b/auth-pam.c | |||
@@ -602,16 +602,16 @@ sshpam_cleanup(void) | |||
602 | return; | 602 | return; |
603 | debug("PAM: cleanup"); | 603 | debug("PAM: cleanup"); |
604 | pam_set_item(sshpam_handle, PAM_CONV, (const void *)&null_conv); | 604 | pam_set_item(sshpam_handle, PAM_CONV, (const void *)&null_conv); |
605 | if (sshpam_cred_established) { | ||
606 | debug("PAM: deleting credentials"); | ||
607 | pam_setcred(sshpam_handle, PAM_DELETE_CRED); | ||
608 | sshpam_cred_established = 0; | ||
609 | } | ||
610 | if (sshpam_session_open) { | 605 | if (sshpam_session_open) { |
611 | debug("PAM: closing session"); | 606 | debug("PAM: closing session"); |
612 | pam_close_session(sshpam_handle, PAM_SILENT); | 607 | pam_close_session(sshpam_handle, PAM_SILENT); |
613 | sshpam_session_open = 0; | 608 | sshpam_session_open = 0; |
614 | } | 609 | } |
610 | if (sshpam_cred_established) { | ||
611 | debug("PAM: deleting credentials"); | ||
612 | pam_setcred(sshpam_handle, PAM_DELETE_CRED); | ||
613 | sshpam_cred_established = 0; | ||
614 | } | ||
615 | sshpam_authenticated = 0; | 615 | sshpam_authenticated = 0; |
616 | pam_end(sshpam_handle, sshpam_err); | 616 | pam_end(sshpam_handle, sshpam_err); |
617 | sshpam_handle = NULL; | 617 | sshpam_handle = NULL; |