diff options
Diffstat (limited to 'auth2-chall.c')
-rw-r--r-- | auth2-chall.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/auth2-chall.c b/auth2-chall.c index 486baaaa3..f5f2f1477 100644 --- a/auth2-chall.c +++ b/auth2-chall.c | |||
@@ -274,12 +274,9 @@ input_userauth_info_response(int type, u_int32_t seq, void *ctxt) | |||
274 | } | 274 | } |
275 | packet_check_eom(); | 275 | packet_check_eom(); |
276 | 276 | ||
277 | if (authctxt->valid) { | 277 | res = kbdintctxt->device->respond(kbdintctxt->ctxt, nresp, response); |
278 | res = kbdintctxt->device->respond(kbdintctxt->ctxt, | 278 | if (!authctxt->valid) |
279 | nresp, response); | 279 | res = 1; /* keep going if login invalid */ |
280 | } else { | ||
281 | res = -1; | ||
282 | } | ||
283 | 280 | ||
284 | for (i = 0; i < nresp; i++) { | 281 | for (i = 0; i < nresp; i++) { |
285 | memset(response[i], 'r', strlen(response[i])); | 282 | memset(response[i], 'r', strlen(response[i])); |
@@ -291,7 +288,7 @@ input_userauth_info_response(int type, u_int32_t seq, void *ctxt) | |||
291 | switch (res) { | 288 | switch (res) { |
292 | case 0: | 289 | case 0: |
293 | /* Success! */ | 290 | /* Success! */ |
294 | authenticated = 1; | 291 | authenticated = authctxt->valid ? 1 : 0; |
295 | break; | 292 | break; |
296 | case 1: | 293 | case 1: |
297 | /* Authentication needs further interaction */ | 294 | /* Authentication needs further interaction */ |