|
Lines 563-577
Link Here
|
| 563 |
void |
563 |
void |
| 564 |
sshpam_cleanup(void) |
564 |
sshpam_cleanup(void) |
| 565 |
{ |
565 |
{ |
| 566 |
debug("PAM: cleanup"); |
566 |
if (sshpam_handle == NULL || (use_privsep && !mm_is_monitor())) |
| 567 |
if (sshpam_handle == NULL) |
|
|
| 568 |
return; |
567 |
return; |
|
|
568 |
debug("PAM: cleanup"); |
| 569 |
pam_set_item(sshpam_handle, PAM_CONV, (const void *)&null_conv); |
569 |
pam_set_item(sshpam_handle, PAM_CONV, (const void *)&null_conv); |
| 570 |
if (sshpam_cred_established) { |
570 |
if (sshpam_cred_established) { |
|
|
571 |
debug("PAM: deleting credentials"); |
| 571 |
pam_setcred(sshpam_handle, PAM_DELETE_CRED); |
572 |
pam_setcred(sshpam_handle, PAM_DELETE_CRED); |
| 572 |
sshpam_cred_established = 0; |
573 |
sshpam_cred_established = 0; |
| 573 |
} |
574 |
} |
| 574 |
if (sshpam_session_open) { |
575 |
if (sshpam_session_open) { |
|
|
576 |
debug("PAM: closing session"); |
| 575 |
pam_close_session(sshpam_handle, PAM_SILENT); |
577 |
pam_close_session(sshpam_handle, PAM_SILENT); |
| 576 |
sshpam_session_open = 0; |
578 |
sshpam_session_open = 0; |
| 577 |
} |
579 |
} |