diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2008-07-23 09:28:49 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2008-07-23 09:28:49 +0000 |
commit | ad22e48f1aa1a1e23017e0555540d2d6b61ced1d (patch) | |
tree | 7f4db193e6aaf3390a97bd79900d7d352cafa0e6 /auth-pam.c | |
parent | 490bfaade9fd39fe364761a9abb9e53381c5571c (diff) | |
download | src-ad22e48f1aa1a1e23017e0555540d2d6b61ced1d.tar.gz src-ad22e48f1aa1a1e23017e0555540d2d6b61ced1d.zip |
Vendor import of OpenSSH 4.9p1 for posterity's sakevendor/openssh/4.9p1
Notes
Notes:
svn path=/vendor-crypto/openssh/dist/; revision=180746
svn path=/vendor-crypto/openssh/4.9p1/; revision=180747; tag=vendor/openssh/4.9p1
Diffstat (limited to 'auth-pam.c')
-rw-r--r-- | auth-pam.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/auth-pam.c b/auth-pam.c index a07f1fe77d86..ccdb9937e364 100644 --- a/auth-pam.c +++ b/auth-pam.c @@ -598,15 +598,17 @@ static struct pam_conv store_conv = { sshpam_store_conv, NULL }; void sshpam_cleanup(void) { - debug("PAM: cleanup"); - if (sshpam_handle == NULL) + if (sshpam_handle == NULL || (use_privsep && !mm_is_monitor())) 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; } |