1 |
< |
/* $OpenBSD: auth2-none.c,v 1.18 2014/07/15 15:54:14 millert Exp $ */ |
1 |
> |
/* $OpenBSD: auth2-none.c,v 1.22 2018/07/09 21:35:50 markus Exp $ */ |
2 |
|
/* |
3 |
|
* Copyright (c) 2000 Markus Friedl. All rights reserved. |
4 |
|
* |
37 |
|
|
38 |
|
#include "atomicio.h" |
39 |
|
#include "xmalloc.h" |
40 |
< |
#include "key.h" |
40 |
> |
#include "sshkey.h" |
41 |
|
#include "hostfile.h" |
42 |
|
#include "auth.h" |
43 |
|
#include "packet.h" |
44 |
|
#include "log.h" |
45 |
– |
#include "buffer.h" |
45 |
|
#include "misc.h" |
46 |
|
#include "servconf.h" |
47 |
|
#include "compat.h" |
48 |
|
#include "ssh2.h" |
49 |
+ |
#include "ssherr.h" |
50 |
|
#ifdef GSSAPI |
51 |
|
#include "ssh-gss.h" |
52 |
|
#endif |
59 |
|
static int none_enabled = 1; |
60 |
|
|
61 |
|
static int |
62 |
< |
userauth_none(Authctxt *authctxt) |
62 |
> |
userauth_none(struct ssh *ssh) |
63 |
|
{ |
64 |
+ |
int r; |
65 |
+ |
|
66 |
|
none_enabled = 0; |
67 |
< |
packet_check_eom(); |
67 |
> |
if ((r = sshpkt_get_end(ssh)) != 0) |
68 |
> |
fatal("%s: %s", __func__, ssh_err(r)); |
69 |
|
if (options.permit_empty_passwd && options.password_authentication) |
70 |
< |
return (PRIVSEP(auth_password(authctxt, ""))); |
70 |
> |
return (PRIVSEP(auth_password(ssh, ""))); |
71 |
|
return (0); |
72 |
|
} |
73 |
|
|