diff options
Diffstat (limited to 'auth2-kbdint.c')
-rw-r--r-- | auth2-kbdint.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/auth2-kbdint.c b/auth2-kbdint.c index bf75c605..e23d2edd 100644 --- a/auth2-kbdint.c +++ b/auth2-kbdint.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-kbdint.c,v 1.7 2014/07/15 15:54:14 millert Exp $ */ +/* $OpenBSD: auth2-kbdint.c,v 1.11 2019/11/13 04:47:52 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -27,35 +27,37 @@ #include <sys/types.h> +#include <stdlib.h> +#include <stdio.h> #include <stdarg.h> #include "xmalloc.h" #include "packet.h" -#include "key.h" #include "hostfile.h" #include "auth.h" #include "log.h" -#include "buffer.h" #include "misc.h" #include "servconf.h" +#include "ssherr.h" /* import */ extern ServerOptions options; static int -userauth_kbdint(Authctxt *authctxt) +userauth_kbdint(struct ssh *ssh) { - int authenticated = 0; + int r, authenticated = 0; char *lang, *devs; - lang = packet_get_string(NULL); - devs = packet_get_string(NULL); - packet_check_eom(); + if ((r = sshpkt_get_cstring(ssh, &lang, NULL)) != 0 || + (r = sshpkt_get_cstring(ssh, &devs, NULL)) != 0 || + (r = sshpkt_get_end(ssh)) != 0) + fatal("%s: %s", __func__, ssh_err(r)); debug("keyboard-interactive devs %s", devs); if (options.challenge_response_authentication) - authenticated = auth2_challenge(authctxt, devs); + authenticated = auth2_challenge(ssh, devs); free(devs); free(lang); |