summaryrefslogtreecommitdiff
path: root/auth2-none.c
diff options
context:
space:
mode:
authormarkus@openbsd.org <markus@openbsd.org>2017-05-30 14:27:22 +0000
committerDamien Miller <djm@mindrot.org>2017-05-31 10:50:20 +1000
commit5a146bbd4fdf5c571f9fb438e5210d28cead76d9 (patch)
tree3a71031a294c0c6dbe8bff5bee6b3c2bbc619b98 /auth2-none.c
parent60306b2d2f029f91927c6aa7c8e08068519a0fa2 (diff)
upstream commit
switch auth2-none.c to modern APIs; ok djm@ Upstream-ID: 07252b58e064d332214bcabbeae8e08c44b2001b
Diffstat (limited to 'auth2-none.c')
-rw-r--r--auth2-none.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/auth2-none.c b/auth2-none.c
index e71e2219c..da6e2dd12 100644
--- a/auth2-none.c
+++ b/auth2-none.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth2-none.c,v 1.18 2014/07/15 15:54:14 millert Exp $ */ 1/* $OpenBSD: auth2-none.c,v 1.19 2017/05/30 14:27:22 markus Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * 4 *
@@ -37,7 +37,7 @@
37 37
38#include "atomicio.h" 38#include "atomicio.h"
39#include "xmalloc.h" 39#include "xmalloc.h"
40#include "key.h" 40#include "sshkey.h"
41#include "hostfile.h" 41#include "hostfile.h"
42#include "auth.h" 42#include "auth.h"
43#include "packet.h" 43#include "packet.h"
@@ -47,6 +47,7 @@
47#include "servconf.h" 47#include "servconf.h"
48#include "compat.h" 48#include "compat.h"
49#include "ssh2.h" 49#include "ssh2.h"
50#include "ssherr.h"
50#ifdef GSSAPI 51#ifdef GSSAPI
51#include "ssh-gss.h" 52#include "ssh-gss.h"
52#endif 53#endif
@@ -61,10 +62,14 @@ static int none_enabled = 1;
61static int 62static int
62userauth_none(Authctxt *authctxt) 63userauth_none(Authctxt *authctxt)
63{ 64{
65 struct ssh *ssh = active_state; /* XXX */
66 int r;
67
64 none_enabled = 0; 68 none_enabled = 0;
65 packet_check_eom(); 69 if ((r = sshpkt_get_end(ssh)) != 0)
70 fatal("%s: %s", __func__, ssh_err(r));
66 if (options.permit_empty_passwd && options.password_authentication) 71 if (options.permit_empty_passwd && options.password_authentication)
67 return (PRIVSEP(auth_password(authctxt, ""))); 72 return (PRIVSEP(auth_password(ssh->authctxt, "")));
68 return (0); 73 return (0);
69} 74}
70 75