summaryrefslogtreecommitdiff
path: root/auth-rhosts.c
diff options
context:
space:
mode:
authormarkus@openbsd.org <markus@openbsd.org>2016-08-13 17:47:40 +0000
committerDamien Miller <djm@mindrot.org>2016-08-14 11:19:14 +1000
commit6cb6dcffe1a2204ba9006de20f73255c268fcb6b (patch)
tree235267a1264f9363c39c4c0b11b59384e9acbdcf /auth-rhosts.c
parent42d47adc5ad1187f22c726cbc52e71d6b1767ca2 (diff)
upstream commit
remove ssh1 server code; ok djm@ Upstream-ID: c24c0c32c49b91740d5a94ae914fb1898ea5f534
Diffstat (limited to 'auth-rhosts.c')
-rw-r--r--auth-rhosts.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/auth-rhosts.c b/auth-rhosts.c
index 0ef344712..ecf956f06 100644
--- a/auth-rhosts.c
+++ b/auth-rhosts.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth-rhosts.c,v 1.47 2016/03/07 19:02:43 djm Exp $ */ 1/* $OpenBSD: auth-rhosts.c,v 1.48 2016/08/13 17:47:41 markus Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -186,20 +186,8 @@ check_rhosts_file(const char *filename, const char *hostname,
186 * true if authentication succeeds. If ignore_rhosts is true, only 186 * true if authentication succeeds. If ignore_rhosts is true, only
187 * /etc/hosts.equiv will be considered (.rhosts and .shosts are ignored). 187 * /etc/hosts.equiv will be considered (.rhosts and .shosts are ignored).
188 */ 188 */
189
190int 189int
191auth_rhosts(struct passwd *pw, const char *client_user) 190auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname,
192{
193 struct ssh *ssh = active_state; /* XXX */
194 const char *hostname, *ipaddr;
195
196 hostname = auth_get_canonical_hostname(ssh, options.use_dns);
197 ipaddr = ssh_remote_ipaddr(ssh);
198 return auth_rhosts2(pw, client_user, hostname, ipaddr);
199}
200
201static int
202auth_rhosts2_raw(struct passwd *pw, const char *client_user, const char *hostname,
203 const char *ipaddr) 191 const char *ipaddr)
204{ 192{
205 char buf[1024]; 193 char buf[1024];
@@ -334,10 +322,3 @@ auth_rhosts2_raw(struct passwd *pw, const char *client_user, const char *hostnam
334 restore_uid(); 322 restore_uid();
335 return 0; 323 return 0;
336} 324}
337
338int
339auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname,
340 const char *ipaddr)
341{
342 return auth_rhosts2_raw(pw, client_user, hostname, ipaddr);
343}