summaryrefslogtreecommitdiff
path: root/auth2-kbdint.c
diff options
context:
space:
mode:
authormarkus@openbsd.org <markus@openbsd.org>2018-07-09 21:35:50 +0000
committerDamien Miller <djm@mindrot.org>2018-07-10 15:27:43 +1000
commitc7d39ac8dc3587c5f05bdd5bcd098eb5c201c0c8 (patch)
tree28e4a7c9d114a3ab3c7710850e54b1a8c41f840e /auth2-kbdint.c
parentc3cb7790e9efb14ba74b2d9f543ad593b3d55b31 (diff)
downloadopenssh-git-c7d39ac8dc3587c5f05bdd5bcd098eb5c201c0c8.tar.gz
upstream: sshd: switch authentication to sshbuf API; ok djm@
OpenBSD-Commit-ID: 880aa06bce4b140781e836bb56bec34873290641
Diffstat (limited to 'auth2-kbdint.c')
-rw-r--r--auth2-kbdint.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/auth2-kbdint.c b/auth2-kbdint.c
index 86aad8dd..a813b8f5 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);