diff options
author | Colin Watson <cjwatson@debian.org> | 2015-08-22 10:05:45 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2015-08-22 10:05:45 +0100 |
commit | 58ddb8ad21f21f5358db0204c4ba9abf94a1ca11 (patch) | |
tree | c55df1f23e6fa0fb87a96d8ec4c06a68c3a82b45 /monitor.c | |
parent | 544df7a04ae5b5c1fc30be7c445ad685d7a02dc9 (diff) | |
parent | 1dc8d93ce69d6565747eb44446ed117187621b26 (diff) |
Import openssh_7.0p1.orig.tar.gz
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1084,9 +1084,7 @@ extern KbdintDevice sshpam_device; | |||
1084 | int | 1084 | int |
1085 | mm_answer_pam_init_ctx(int sock, Buffer *m) | 1085 | mm_answer_pam_init_ctx(int sock, Buffer *m) |
1086 | { | 1086 | { |
1087 | |||
1088 | debug3("%s", __func__); | 1087 | debug3("%s", __func__); |
1089 | authctxt->user = buffer_get_string(m, NULL); | ||
1090 | sshpam_ctxt = (sshpam_device.init_ctx)(authctxt); | 1088 | sshpam_ctxt = (sshpam_device.init_ctx)(authctxt); |
1091 | sshpam_authok = NULL; | 1089 | sshpam_authok = NULL; |
1092 | buffer_clear(m); | 1090 | buffer_clear(m); |
@@ -1168,14 +1166,16 @@ mm_answer_pam_respond(int sock, Buffer *m) | |||
1168 | int | 1166 | int |
1169 | mm_answer_pam_free_ctx(int sock, Buffer *m) | 1167 | mm_answer_pam_free_ctx(int sock, Buffer *m) |
1170 | { | 1168 | { |
1169 | int r = sshpam_authok != NULL && sshpam_authok == sshpam_ctxt; | ||
1171 | 1170 | ||
1172 | debug3("%s", __func__); | 1171 | debug3("%s", __func__); |
1173 | (sshpam_device.free_ctx)(sshpam_ctxt); | 1172 | (sshpam_device.free_ctx)(sshpam_ctxt); |
1173 | sshpam_ctxt = sshpam_authok = NULL; | ||
1174 | buffer_clear(m); | 1174 | buffer_clear(m); |
1175 | mm_request_send(sock, MONITOR_ANS_PAM_FREE_CTX, m); | 1175 | mm_request_send(sock, MONITOR_ANS_PAM_FREE_CTX, m); |
1176 | auth_method = "keyboard-interactive"; | 1176 | auth_method = "keyboard-interactive"; |
1177 | auth_submethod = "pam"; | 1177 | auth_submethod = "pam"; |
1178 | return (sshpam_authok == sshpam_ctxt); | 1178 | return r; |
1179 | } | 1179 | } |
1180 | #endif | 1180 | #endif |
1181 | 1181 | ||