aboutsummaryrefslogtreecommitdiff
path: root/security/openssh-portable/files/patch-auth-chall.c
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2003-09-26 02:42:39 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2003-09-26 02:42:39 +0000
commit91f368c34495a326a16f6b12d21a39195c2afe7a (patch)
tree49324cd1012667a71e1084cd401f7b521bea0dbd /security/openssh-portable/files/patch-auth-chall.c
parent3429858e205d597d81b4f32561df342d9d6202be (diff)
Notes
Diffstat (limited to 'security/openssh-portable/files/patch-auth-chall.c')
-rw-r--r--security/openssh-portable/files/patch-auth-chall.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/security/openssh-portable/files/patch-auth-chall.c b/security/openssh-portable/files/patch-auth-chall.c
new file mode 100644
index 000000000000..067fd559451b
--- /dev/null
+++ b/security/openssh-portable/files/patch-auth-chall.c
@@ -0,0 +1,36 @@
+--- auth-chall.c Tue Jun 5 20:56:17 2001
++++ cvs-current/auth-chall.c Wed Sep 24 20:24:27 2003
+@@ -76,7 +77,33 @@
+ return 0;
+ resp[0] = (char *)response;
+ res = device->respond(authctxt->kbdintctxt, 1, resp);
++ if (res == 1) {
++ /* postponed - send a null query just in case */
++ char *name, *info, **prompts;
++ u_int i, numprompts, *echo_on;
++
++ res = device->query(authctxt->kbdintctxt, &name, &info,
++ &numprompts, &prompts, &echo_on);
++ if (res == 0) {
++ for (i = 0; i < numprompts; i++)
++ xfree(prompts[i]);
++ xfree(prompts);
++ xfree(name);
++ xfree(echo_on);
++ xfree(info);
++ }
++ /* if we received more prompts, we're screwed */
++ res = (res == 0 && numprompts == 0) ? 0 : -1;
++ }
+ device->free_ctx(authctxt->kbdintctxt);
+ authctxt->kbdintctxt = NULL;
+ return res ? 0 : 1;
++}
++void
++abandon_challenge_response(Authctxt *authctxt)
++{
++ if (authctxt->kbdintctxt != NULL) {
++ device->free_ctx(authctxt->kbdintctxt);
++ authctxt->kbdintctxt = NULL;
++ }
+ }