diff options
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1166,14 +1166,16 @@ mm_answer_pam_respond(int sock, Buffer *m) | |||
1166 | int | 1166 | int |
1167 | mm_answer_pam_free_ctx(int sock, Buffer *m) | 1167 | mm_answer_pam_free_ctx(int sock, Buffer *m) |
1168 | { | 1168 | { |
1169 | int r = sshpam_authok != NULL && sshpam_authok == sshpam_ctxt; | ||
1169 | 1170 | ||
1170 | debug3("%s", __func__); | 1171 | debug3("%s", __func__); |
1171 | (sshpam_device.free_ctx)(sshpam_ctxt); | 1172 | (sshpam_device.free_ctx)(sshpam_ctxt); |
1173 | sshpam_ctxt = sshpam_authok = NULL; | ||
1172 | buffer_clear(m); | 1174 | buffer_clear(m); |
1173 | mm_request_send(sock, MONITOR_ANS_PAM_FREE_CTX, m); | 1175 | mm_request_send(sock, MONITOR_ANS_PAM_FREE_CTX, m); |
1174 | auth_method = "keyboard-interactive"; | 1176 | auth_method = "keyboard-interactive"; |
1175 | auth_submethod = "pam"; | 1177 | auth_submethod = "pam"; |
1176 | return (sshpam_authok == sshpam_ctxt); | 1178 | return r; |
1177 | } | 1179 | } |
1178 | #endif | 1180 | #endif |
1179 | 1181 | ||