diff options
Diffstat (limited to 'auth2-none.c')
-rw-r--r-- | auth2-none.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/auth2-none.c b/auth2-none.c index 8966fd0..c3ed53f 100644 --- a/auth2-none.c +++ b/auth2-none.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-none.c,v 1.25 2023/03/05 05:34:09 dtucker Exp $ */ +/* $OpenBSD: auth2-none.c,v 1.26 2024/05/17 00:30:23 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -53,9 +53,9 @@ /* import */ extern ServerOptions options; +extern struct authmethod_cfg methodcfg_none; -/* "none" is allowed only one time */ -static int none_enabled = 1; +extern int none_enabled; static int userauth_none(struct ssh *ssh, const char *method) @@ -66,13 +66,11 @@ userauth_none(struct ssh *ssh, const char *method) if ((r = sshpkt_get_end(ssh)) != 0) fatal_fr(r, "parse packet"); if (options.permit_empty_passwd && options.password_authentication) - return (PRIVSEP(auth_password(ssh, ""))); + return mm_auth_password(ssh, ""); return (0); } Authmethod method_none = { - "none", - NULL, + &methodcfg_none, userauth_none, - &none_enabled }; |