]> andersk Git - gssapi-openssh.git/blobdiff - openssh/auth-pam.c
merged OpenSSH 5.3p1 to trunk
[gssapi-openssh.git] / openssh / auth-pam.c
index 582c463a1fa596680052990e83f4db8180c233bc..90ec372c05309cebdf1a84f97797b4eaa1da0254 100644 (file)
@@ -660,16 +660,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;
This page took 0.050741 seconds and 4 git commands to generate.