summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--monitor.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/monitor.c b/monitor.c
index 3fc9253e4..c063ad1a0 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1209,14 +1209,16 @@ mm_answer_pam_respond(int sock, Buffer *m)
1209int 1209int
1210mm_answer_pam_free_ctx(int sock, Buffer *m) 1210mm_answer_pam_free_ctx(int sock, Buffer *m)
1211{ 1211{
1212 int r = sshpam_authok != NULL && sshpam_authok == sshpam_ctxt;
1212 1213
1213 debug3("%s", __func__); 1214 debug3("%s", __func__);
1214 (sshpam_device.free_ctx)(sshpam_ctxt); 1215 (sshpam_device.free_ctx)(sshpam_ctxt);
1216 sshpam_ctxt = sshpam_authok = NULL;
1215 buffer_clear(m); 1217 buffer_clear(m);
1216 mm_request_send(sock, MONITOR_ANS_PAM_FREE_CTX, m); 1218 mm_request_send(sock, MONITOR_ANS_PAM_FREE_CTX, m);
1217 auth_method = "keyboard-interactive"; 1219 auth_method = "keyboard-interactive";
1218 auth_submethod = "pam"; 1220 auth_submethod = "pam";
1219 return (sshpam_authok == sshpam_ctxt); 1221 return r;
1220} 1222}
1221#endif 1223#endif
1222 1224