diff options
Diffstat (limited to 'auth2-hostbased.c')
-rw-r--r-- | auth2-hostbased.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/auth2-hostbased.c b/auth2-hostbased.c index 3a29126c37a6..36b9d2f5b0e5 100644 --- a/auth2-hostbased.c +++ b/auth2-hostbased.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-hostbased.c,v 1.47 2021/07/23 03:37:52 djm Exp $ */ +/* $OpenBSD: auth2-hostbased.c,v 1.49 2022/01/06 22:01:14 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -57,7 +57,7 @@ extern ServerOptions options; static int -userauth_hostbased(struct ssh *ssh) +userauth_hostbased(struct ssh *ssh, const char *method) { Authctxt *authctxt = ssh->authctxt; struct sshbuf *b; @@ -108,8 +108,8 @@ userauth_hostbased(struct ssh *ssh) goto done; } if (match_pattern_list(pkalg, options.hostbased_accepted_algos, 0) != 1) { - logit_f("key type %s not in HostbasedAcceptedAlgorithms", - sshkey_type(key)); + logit_f("signature algorithm %s not in " + "HostbasedAcceptedAlgorithms", pkalg); goto done; } if ((r = sshkey_check_cert_sigtype(key, @@ -132,7 +132,7 @@ userauth_hostbased(struct ssh *ssh) (r = sshbuf_put_u8(b, SSH2_MSG_USERAUTH_REQUEST)) != 0 || (r = sshbuf_put_cstring(b, authctxt->user)) != 0 || (r = sshbuf_put_cstring(b, authctxt->service)) != 0 || - (r = sshbuf_put_cstring(b, "hostbased")) != 0 || + (r = sshbuf_put_cstring(b, method)) != 0 || (r = sshbuf_put_string(b, pkalg, alen)) != 0 || (r = sshbuf_put_string(b, pkblob, blen)) != 0 || (r = sshbuf_put_cstring(b, chost)) != 0 || @@ -255,6 +255,7 @@ hostbased_key_allowed(struct ssh *ssh, struct passwd *pw, Authmethod method_hostbased = { "hostbased", + NULL, userauth_hostbased, &options.hostbased_authentication }; |