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)
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 86aad8ddc..a813b8f56 100644
--- a/auth2-kbdint.c
+++ b/auth2-kbdint.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth2-kbdint.c,v 1.8 2017/05/30 14:29:59 markus Exp $ */ 1/* $OpenBSD: auth2-kbdint.c,v 1.9 2018/07/09 21:35:50 markus Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * 4 *
@@ -31,13 +31,12 @@
31 31
32#include "xmalloc.h" 32#include "xmalloc.h"
33#include "packet.h" 33#include "packet.h"
34#include "key.h"
35#include "hostfile.h" 34#include "hostfile.h"
36#include "auth.h" 35#include "auth.h"
37#include "log.h" 36#include "log.h"
38#include "buffer.h"
39#include "misc.h" 37#include "misc.h"
40#include "servconf.h" 38#include "servconf.h"
39#include "ssherr.h"
41 40
42/* import */ 41/* import */
43extern ServerOptions options; 42extern ServerOptions options;
@@ -45,12 +44,13 @@ extern ServerOptions options;
45static int 44static int
46userauth_kbdint(struct ssh *ssh) 45userauth_kbdint(struct ssh *ssh)
47{ 46{
48 int authenticated = 0; 47 int r, authenticated = 0;
49 char *lang, *devs; 48 char *lang, *devs;
50 49
51 lang = packet_get_string(NULL); 50 if ((r = sshpkt_get_cstring(ssh, &lang, NULL)) != 0 ||
52 devs = packet_get_string(NULL); 51 (r = sshpkt_get_cstring(ssh, &devs, NULL)) != 0 ||
53 packet_check_eom(); 52 (r = sshpkt_get_end(ssh)) != 0)
53 fatal("%s: %s", __func__, ssh_err(r));
54 54
55 debug("keyboard-interactive devs %s", devs); 55 debug("keyboard-interactive devs %s", devs);
56 56