diff options
Diffstat (limited to 'auth2-none.c')
-rw-r--r-- | auth2-none.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/auth2-none.c b/auth2-none.c index e71e2219c..35d25fa63 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.20 2017/05/30 14:29:59 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 |
@@ -59,12 +60,15 @@ extern ServerOptions options; | |||
59 | static int none_enabled = 1; | 60 | static int none_enabled = 1; |
60 | 61 | ||
61 | static int | 62 | static int |
62 | userauth_none(Authctxt *authctxt) | 63 | userauth_none(struct ssh *ssh) |
63 | { | 64 | { |
65 | int r; | ||
66 | |||
64 | none_enabled = 0; | 67 | none_enabled = 0; |
65 | packet_check_eom(); | 68 | if ((r = sshpkt_get_end(ssh)) != 0) |
69 | fatal("%s: %s", __func__, ssh_err(r)); | ||
66 | if (options.permit_empty_passwd && options.password_authentication) | 70 | if (options.permit_empty_passwd && options.password_authentication) |
67 | return (PRIVSEP(auth_password(authctxt, ""))); | 71 | return (PRIVSEP(auth_password(ssh->authctxt, ""))); |
68 | return (0); | 72 | return (0); |
69 | } | 73 | } |
70 | 74 | ||