summaryrefslogtreecommitdiff
path: root/auth-chall.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth-chall.c')
-rw-r--r--auth-chall.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/auth-chall.c b/auth-chall.c
index 45e0c3452..6b7c8bd13 100644
--- a/auth-chall.c
+++ b/auth-chall.c
@@ -76,7 +76,33 @@ verify_response(Authctxt *authctxt, const char *response)
76 return 0; 76 return 0;
77 resp[0] = (char *)response; 77 resp[0] = (char *)response;
78 res = device->respond(authctxt->kbdintctxt, 1, resp); 78 res = device->respond(authctxt->kbdintctxt, 1, resp);
79 if (res == 1) {
80 /* postponed - send a null query just in case */
81 char *name, *info, **prompts;
82 u_int i, numprompts, *echo_on;
83
84 res = device->query(authctxt->kbdintctxt, &name, &info,
85 &numprompts, &prompts, &echo_on);
86 if (res == 0) {
87 for (i = 0; i < numprompts; i++)
88 xfree(prompts[i]);
89 xfree(prompts);
90 xfree(name);
91 xfree(echo_on);
92 xfree(info);
93 }
94 /* if we received more prompts, we're screwed */
95 res = (numprompts != 0);
96 }
79 device->free_ctx(authctxt->kbdintctxt); 97 device->free_ctx(authctxt->kbdintctxt);
80 authctxt->kbdintctxt = NULL; 98 authctxt->kbdintctxt = NULL;
81 return res ? 0 : 1; 99 return res ? 0 : 1;
82} 100}
101void
102abandon_challenge_response(Authctxt *authctxt)
103{
104 if (authctxt->kbdintctxt != NULL) {
105 device->free_ctx(authctxt->kbdintctxt);
106 authctxt->kbdintctxt = NULL;
107 }
108}