summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2017-05-30 14:27:23 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2017-05-30 14:27:23 +0000
commitd57a0881feb56e64c61dabd5e73ed9d5dc6bbd5c (patch)
treeddd82fe7e67c512c9b7ff491c33774d67b2d5509 /usr.bin
parente1d91ccf0bc015556c5260a3c3ef9bec63a1336e (diff)
switch auth2-none.c to modern APIs; ok djm@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/auth2-none.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/usr.bin/ssh/auth2-none.c b/usr.bin/ssh/auth2-none.c
index 5b45185d964..c496d07d2ae 100644
--- a/usr.bin/ssh/auth2-none.c
+++ b/usr.bin/ssh/auth2-none.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth2-none.c,v 1.18 2014/07/15 15:54:14 millert Exp $ */
+/* $OpenBSD: auth2-none.c,v 1.19 2017/05/30 14:27:22 markus Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
@@ -28,7 +28,7 @@
#include <stdio.h>
#include "xmalloc.h"
-#include "key.h"
+#include "sshkey.h"
#include "hostfile.h"
#include "auth.h"
#include "packet.h"
@@ -38,6 +38,7 @@
#include "servconf.h"
#include "compat.h"
#include "ssh2.h"
+#include "ssherr.h"
#ifdef GSSAPI
#include "ssh-gss.h"
#endif
@@ -52,10 +53,14 @@ static int none_enabled = 1;
static int
userauth_none(Authctxt *authctxt)
{
+ struct ssh *ssh = active_state; /* XXX */
+ int r;
+
none_enabled = 0;
- packet_check_eom();
+ if ((r = sshpkt_get_end(ssh)) != 0)
+ fatal("%s: %s", __func__, ssh_err(r));
if (options.permit_empty_passwd && options.password_authentication)
- return (PRIVSEP(auth_password(authctxt, "")));
+ return (PRIVSEP(auth_password(ssh->authctxt, "")));
return (0);
}