summaryrefslogtreecommitdiff
path: root/auth2-hostbased.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth2-hostbased.c')
-rw-r--r--auth2-hostbased.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/auth2-hostbased.c b/auth2-hostbased.c
index 764ceff74..0c40fad4e 100644
--- a/auth2-hostbased.c
+++ b/auth2-hostbased.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth2-hostbased.c,v 1.38 2018/09/20 03:28:06 djm Exp $ */ 1/* $OpenBSD: auth2-hostbased.c,v 1.40 2019/01/19 21:43:56 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * 4 *
@@ -147,7 +147,8 @@ userauth_hostbased(struct ssh *ssh)
147 147
148 /* test for allowed key and correct signature */ 148 /* test for allowed key and correct signature */
149 authenticated = 0; 149 authenticated = 0;
150 if (PRIVSEP(hostbased_key_allowed(authctxt->pw, cuser, chost, key)) && 150 if (PRIVSEP(hostbased_key_allowed(ssh, authctxt->pw, cuser,
151 chost, key)) &&
151 PRIVSEP(sshkey_verify(key, sig, slen, 152 PRIVSEP(sshkey_verify(key, sig, slen,
152 sshbuf_ptr(b), sshbuf_len(b), pkalg, ssh->compat)) == 0) 153 sshbuf_ptr(b), sshbuf_len(b), pkalg, ssh->compat)) == 0)
153 authenticated = 1; 154 authenticated = 1;
@@ -167,10 +168,9 @@ done:
167 168
168/* return 1 if given hostkey is allowed */ 169/* return 1 if given hostkey is allowed */
169int 170int
170hostbased_key_allowed(struct passwd *pw, const char *cuser, char *chost, 171hostbased_key_allowed(struct ssh *ssh, struct passwd *pw,
171 struct sshkey *key) 172 const char *cuser, char *chost, struct sshkey *key)
172{ 173{
173 struct ssh *ssh = active_state; /* XXX */
174 const char *resolvedname, *ipaddr, *lookup, *reason; 174 const char *resolvedname, *ipaddr, *lookup, *reason;
175 HostStatus host_status; 175 HostStatus host_status;
176 int len; 176 int len;