summaryrefslogtreecommitdiff
path: root/auth-rhosts.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2016-12-20 00:22:52 +0000
committerColin Watson <cjwatson@debian.org>2016-12-20 00:22:52 +0000
commit971a7653746a6972b907dfe0ce139c06e4a6f482 (patch)
tree70fb964265d57ae4967be55b75dbb2a122e9b969 /auth-rhosts.c
parenta8ed8d256b2e2c05b0c15565a7938028c5192277 (diff)
parent4a354fc231174901f2629437c2a6e924a2dd6772 (diff)
Import openssh_7.4p1.orig.tar.gz
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}