Skip to content

Commit

Permalink
- (dtucker) [auth-pam.c] Bug #1534: move the deletion of PAM credent…
Browse files Browse the repository at this point in the history
…ials on

   logout to after the session close.  Patch from Anicka Bernathova, ok djm.
  • Loading branch information
daztucker committed Jul 12, 2009
1 parent 8fdcba5 commit 622d5c5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
prevents configure complaining on older BSDs.
- (dtucker [contrib/cygwin/ssh-{host,user}-config] Add license text. Patch
from Corinna Vinschen.
- (dtucker) [auth-pam.c] Bug #1534: move the deletion of PAM credentials on
logout to after the session close. Patch from Anicka Bernathova, ok djm.

20090707
- (dtucker) [contrib/cygwin/ssh-host-config] better support for automated
Expand Down
10 changes: 5 additions & 5 deletions auth-pam.c
Original file line number Diff line number Diff line change
Expand Up @@ -602,16 +602,16 @@ sshpam_cleanup(void)
return;
debug("PAM: cleanup");
pam_set_item(sshpam_handle, PAM_CONV, (const void *)&null_conv);
if (sshpam_cred_established) {
debug("PAM: deleting credentials");
pam_setcred(sshpam_handle, PAM_DELETE_CRED);
sshpam_cred_established = 0;
}
if (sshpam_session_open) {
debug("PAM: closing session");
pam_close_session(sshpam_handle, PAM_SILENT);
sshpam_session_open = 0;
}
if (sshpam_cred_established) {
debug("PAM: deleting credentials");
pam_setcred(sshpam_handle, PAM_DELETE_CRED);
sshpam_cred_established = 0;
}
sshpam_authenticated = 0;
pam_end(sshpam_handle, sshpam_err);
sshpam_handle = NULL;
Expand Down

0 comments on commit 622d5c5

Please sign in to comment.