From c7d39ac8dc3587c5f05bdd5bcd098eb5c201c0c8 Mon Sep 17 00:00:00 2001 From: "markus@openbsd.org" Date: Mon, 9 Jul 2018 21:35:50 +0000 Subject: upstream: sshd: switch authentication to sshbuf API; ok djm@ OpenBSD-Commit-ID: 880aa06bce4b140781e836bb56bec34873290641 --- auth2-kbdint.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'auth2-kbdint.c') diff --git a/auth2-kbdint.c b/auth2-kbdint.c index 86aad8ddc..a813b8f56 100644 --- a/auth2-kbdint.c +++ b/auth2-kbdint.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-kbdint.c,v 1.8 2017/05/30 14:29:59 markus Exp $ */ +/* $OpenBSD: auth2-kbdint.c,v 1.9 2018/07/09 21:35:50 markus Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -31,13 +31,12 @@ #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; @@ -45,12 +44,13 @@ extern ServerOptions options; static int 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); -- cgit v1.2.3