summaryrefslogtreecommitdiff
path: root/auth2-none.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth2-none.c')
-rw-r--r--auth2-none.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/auth2-none.c b/auth2-none.c
index 5d59bda3..f457c378 100644
--- a/auth2-none.c
+++ b/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.22 2018/07/09 21:35:50 markus Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
@@ -37,16 +37,16 @@
#include "atomicio.h"
#include "xmalloc.h"
-#include "key.h"
+#include "sshkey.h"
#include "hostfile.h"
#include "auth.h"
#include "packet.h"
#include "log.h"
-#include "buffer.h"
#include "misc.h"
#include "servconf.h"
#include "compat.h"
#include "ssh2.h"
+#include "ssherr.h"
#ifdef GSSAPI
#include "ssh-gss.h"
#endif
@@ -59,15 +59,18 @@ extern ServerOptions options;
static int none_enabled = 1;
static int
-userauth_none(Authctxt *authctxt)
+userauth_none(struct ssh *ssh)
{
+ int r;
+
none_enabled = 0;
- packet_check_eom();
+ if ((r = sshpkt_get_end(ssh)) != 0)
+ fatal("%s: %s", __func__, ssh_err(r));
/* no password authentication in Android. */
#if !defined(ANDROID)
if (options.permit_empty_passwd && options.password_authentication)
- return (PRIVSEP(auth_password(authctxt, "")));
+ return (PRIVSEP(auth_password(ssh, "")));
#endif
return (0);
}