|
Lines 573-587
static struct pam_conv store_conv = { ss
Link Here
|
| 573 |
void |
573 |
void |
| 574 |
sshpam_cleanup(void) |
574 |
sshpam_cleanup(void) |
| 575 |
{ |
575 |
{ |
| 576 |
debug("PAM: cleanup"); |
576 |
if (sshpam_handle == NULL || (use_privsep && !mm_is_monitor())) |
| 577 |
if (sshpam_handle == NULL) |
|
|
| 578 |
return; |
577 |
return; |
|
|
578 |
debug("PAM: cleanup"); |
| 579 |
pam_set_item(sshpam_handle, PAM_CONV, (const void *)&null_conv); |
579 |
pam_set_item(sshpam_handle, PAM_CONV, (const void *)&null_conv); |
| 580 |
if (sshpam_cred_established) { |
580 |
if (sshpam_cred_established) { |
|
|
581 |
debug("PAM: deleting credentials"); |
| 581 |
pam_setcred(sshpam_handle, PAM_DELETE_CRED); |
582 |
pam_setcred(sshpam_handle, PAM_DELETE_CRED); |
| 582 |
sshpam_cred_established = 0; |
583 |
sshpam_cred_established = 0; |
| 583 |
} |
584 |
} |
| 584 |
if (sshpam_session_open) { |
585 |
if (sshpam_session_open) { |
|
|
586 |
debug("PAM: closing session"); |
| 585 |
pam_close_session(sshpam_handle, PAM_SILENT); |
587 |
pam_close_session(sshpam_handle, PAM_SILENT); |
| 586 |
sshpam_session_open = 0; |
588 |
sshpam_session_open = 0; |
| 587 |
} |
589 |
} |