diff options
author | markus@openbsd.org <markus@openbsd.org> | 2018-07-09 23:35:50 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2018-07-10 07:27:43 +0200 |
commit | c7d39ac8dc3587c5f05bdd5bcd098eb5c201c0c8 (patch) | |
tree | 28e4a7c9d114a3ab3c7710850e54b1a8c41f840e /auth2-kbdint.c | |
parent | upstream: sshd: switch config to sshbuf API; ok djm@ (diff) | |
download | openssh-c7d39ac8dc3587c5f05bdd5bcd098eb5c201c0c8.tar.xz openssh-c7d39ac8dc3587c5f05bdd5bcd098eb5c201c0c8.zip |
upstream: sshd: switch authentication to sshbuf API; ok djm@
OpenBSD-Commit-ID: 880aa06bce4b140781e836bb56bec34873290641
Diffstat (limited to 'auth2-kbdint.c')
-rw-r--r-- | auth2-kbdint.c | 14 |
1 files changed, 7 insertions, 7 deletions
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); |