summaryrefslogtreecommitdiff
path: root/auth-rh-rsa.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2016-08-06 10:49:59 +0100
committerColin Watson <cjwatson@debian.org>2016-08-07 12:18:58 +0100
commit477bb7636238c106f8cd7c868a8c0c5eabcfb3db (patch)
tree601176af2ecf358c36b766776a86845ad7a3cd6f /auth-rh-rsa.c
parent747fac2de0d889183f67f6900194c0462c558544 (diff)
parent4c914ccd85bbf391c4dc61b85e3c178fef465e3f (diff)
New upstream release (7.3p1).
Diffstat (limited to 'auth-rh-rsa.c')
-rw-r--r--auth-rh-rsa.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/auth-rh-rsa.c b/auth-rh-rsa.c
index 2e20396ea..057335ba4 100644
--- a/auth-rh-rsa.c
+++ b/auth-rh-rsa.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth-rh-rsa.c,v 1.44 2014/07/15 15:54:14 millert Exp $ */ 1/* $OpenBSD: auth-rh-rsa.c,v 1.45 2016/03/07 19:02:43 djm 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
@@ -42,8 +42,8 @@
42extern ServerOptions options; 42extern ServerOptions options;
43 43
44int 44int
45auth_rhosts_rsa_key_allowed(struct passwd *pw, char *cuser, char *chost, 45auth_rhosts_rsa_key_allowed(struct passwd *pw, const char *cuser,
46 Key *client_host_key) 46 const char *chost, Key *client_host_key)
47{ 47{
48 HostStatus host_status; 48 HostStatus host_status;
49 49
@@ -68,7 +68,8 @@ auth_rhosts_rsa_key_allowed(struct passwd *pw, char *cuser, char *chost,
68int 68int
69auth_rhosts_rsa(Authctxt *authctxt, char *cuser, Key *client_host_key) 69auth_rhosts_rsa(Authctxt *authctxt, char *cuser, Key *client_host_key)
70{ 70{
71 char *chost; 71 struct ssh *ssh = active_state; /* XXX */
72 const char *chost;
72 struct passwd *pw = authctxt->pw; 73 struct passwd *pw = authctxt->pw;
73 74
74 debug("Trying rhosts with RSA host authentication for client user %.100s", 75 debug("Trying rhosts with RSA host authentication for client user %.100s",
@@ -78,7 +79,7 @@ auth_rhosts_rsa(Authctxt *authctxt, char *cuser, Key *client_host_key)
78 client_host_key->rsa == NULL) 79 client_host_key->rsa == NULL)
79 return 0; 80 return 0;
80 81
81 chost = (char *)get_canonical_hostname(options.use_dns); 82 chost = auth_get_canonical_hostname(ssh, options.use_dns);
82 debug("Rhosts RSA authentication: canonical host %.900s", chost); 83 debug("Rhosts RSA authentication: canonical host %.900s", chost);
83 84
84 if (!PRIVSEP(auth_rhosts_rsa_key_allowed(pw, cuser, chost, client_host_key))) { 85 if (!PRIVSEP(auth_rhosts_rsa_key_allowed(pw, cuser, chost, client_host_key))) {