summaryrefslogtreecommitdiff
path: root/auth.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2022-05-27 05:01:25 +0000
committerDamien Miller <djm@mindrot.org>2022-05-27 16:36:06 +1000
commit3b0b142d2a0767d8cd838e2f3aefde8a0aaa41e1 (patch)
treef3163a4aa5e15f0cbde576bcb45206b6a75c8c4c /auth.c
parent2c334fd36f80cb91cc42e4b978b10aa35e0df236 (diff)
downloadopenssh-git-3b0b142d2a0767d8cd838e2f3aefde8a0aaa41e1.tar.gz
upstream: refactor authorized_keys/principals handling
remove "struct ssh *" from arguments - this was only used to pass the remote host/address. These can be passed in instead and the resulting code is less tightly coupled to ssh_api.[ch] ok dtucker@ OpenBSD-Commit-ID: 9d4373d013edc4cc4b5c21a599e1837ac31dda0d
Diffstat (limited to 'auth.c')
-rw-r--r--auth.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/auth.c b/auth.c
index 5809c0b0..57ade8db 100644
--- a/auth.c
+++ b/auth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth.c,v 1.155 2022/04/26 07:41:44 dtucker Exp $ */
+/* $OpenBSD: auth.c,v 1.156 2022/05/27 05:01:25 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
@@ -914,12 +914,10 @@ auth_restrict_session(struct ssh *ssh)
}
int
-auth_authorise_keyopts(struct ssh *ssh, struct passwd *pw,
- struct sshauthopt *opts, int allow_cert_authority, const char *loc)
+auth_authorise_keyopts(struct passwd *pw, struct sshauthopt *opts,
+ int allow_cert_authority, const char *remote_ip, const char *remote_host,
+ const char *loc)
{
- const char *remote_ip = ssh_remote_ipaddr(ssh);
- const char *remote_host = auth_get_canonical_hostname(ssh,
- options.use_dns);
time_t now = time(NULL);
char buf[64];