summaryrefslogtreecommitdiff
path: root/auth2-chall.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth2-chall.c')
-rw-r--r--auth2-chall.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/auth2-chall.c b/auth2-chall.c
index e6dbffe22..6505d4009 100644
--- a/auth2-chall.c
+++ b/auth2-chall.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth2-chall.c,v 1.34 2008/12/09 04:32:22 djm Exp $ */ 1/* $OpenBSD: auth2-chall.c,v 1.36 2012/12/03 00:14:06 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
4 * Copyright (c) 2001 Per Allansson. All rights reserved. 4 * Copyright (c) 2001 Per Allansson. All rights reserved.
@@ -283,7 +283,8 @@ input_userauth_info_response(int type, u_int32_t seq, void *ctxt)
283 KbdintAuthctxt *kbdintctxt; 283 KbdintAuthctxt *kbdintctxt;
284 int authenticated = 0, res; 284 int authenticated = 0, res;
285 u_int i, nresp; 285 u_int i, nresp;
286 char **response = NULL, *method; 286 const char *devicename = NULL;
287 char **response = NULL;
287 288
288 if (authctxt == NULL) 289 if (authctxt == NULL)
289 fatal("input_userauth_info_response: no authctxt"); 290 fatal("input_userauth_info_response: no authctxt");
@@ -329,9 +330,7 @@ input_userauth_info_response(int type, u_int32_t seq, void *ctxt)
329 /* Failure! */ 330 /* Failure! */
330 break; 331 break;
331 } 332 }
332 333 devicename = kbdintctxt->device->name;
333 xasprintf(&method, "keyboard-interactive/%s", kbdintctxt->device->name);
334
335 if (!authctxt->postponed) { 334 if (!authctxt->postponed) {
336 if (authenticated) { 335 if (authenticated) {
337 auth2_challenge_stop(authctxt); 336 auth2_challenge_stop(authctxt);
@@ -341,8 +340,8 @@ input_userauth_info_response(int type, u_int32_t seq, void *ctxt)
341 auth2_challenge_start(authctxt); 340 auth2_challenge_start(authctxt);
342 } 341 }
343 } 342 }
344 userauth_finish(authctxt, authenticated, method); 343 userauth_finish(authctxt, authenticated, "keyboard-interactive",
345 xfree(method); 344 devicename);
346} 345}
347 346
348void 347void