summaryrefslogtreecommitdiff
path: root/auth2-none.c
diff options
context:
space:
mode:
authorAlistair Delva <adelva@google.com>2020-08-20 16:14:23 -0700
committerAlistair Delva <adelva@google.com>2020-08-20 16:53:18 -0700
commitd9da10d147d633fdb6ec65e17ff4b8447419d83e (patch)
tree8f93e8fdc2907f141e0924910bfec26669819f0b /auth2-none.c
parent22246b08952d746a7cc5a292570636cf4277598f (diff)
parentecb2c02d994b3e21994f31a70ff911667c262f1f (diff)
Merge upstream-master into master
Commit ecb2c02d994b3e21994f31a70ff911667c262f1f upstream This nearly (but not quite) corresponds to V_8_3_P1; subsequent cherry-picks will correct this. Bug: 162492243 Change-Id: I3c079d86435b7c25aefff4538dc89a3002b1e25b
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);
}