|
Lines 598-612
static struct pam_conv store_conv = { ss
Link Here
|
| 598 |
void |
598 |
void |
| 599 |
sshpam_cleanup(void) |
599 |
sshpam_cleanup(void) |
| 600 |
{ |
600 |
{ |
| 601 |
debug("PAM: cleanup"); |
601 |
if (sshpam_handle == NULL || (use_privsep && !mm_is_monitor())) |
| 602 |
if (sshpam_handle == NULL) |
|
|
| 603 |
return; |
602 |
return; |
|
|
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) { |
605 |
if (sshpam_cred_established) { |
|
|
606 |
debug("PAM: deleting credentials"); |
| 606 |
pam_setcred(sshpam_handle, PAM_DELETE_CRED); |
607 |
pam_setcred(sshpam_handle, PAM_DELETE_CRED); |
| 607 |
sshpam_cred_established = 0; |
608 |
sshpam_cred_established = 0; |
| 608 |
} |
609 |
} |
| 609 |
if (sshpam_session_open) { |
610 |
if (sshpam_session_open) { |
|
|
611 |
debug("PAM: closing session"); |
| 610 |
pam_close_session(sshpam_handle, PAM_SILENT); |
612 |
pam_close_session(sshpam_handle, PAM_SILENT); |
| 611 |
sshpam_session_open = 0; |
613 |
sshpam_session_open = 0; |
| 612 |
} |
614 |
} |