X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/3e65880ea08bbb0f8dc656cf39452aebe9fd1506..69538b0c680486cc60423b48f419583a9e5b4650:/auth-rh-rsa.c diff --git a/auth-rh-rsa.c b/auth-rh-rsa.c index 2a88e18b..d7848d04 100644 --- a/auth-rh-rsa.c +++ b/auth-rh-rsa.c @@ -13,7 +13,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth-rh-rsa.c,v 1.31 2002/03/16 17:22:09 markus Exp $"); +RCSID("$OpenBSD: auth-rh-rsa.c,v 1.34 2002/03/25 09:25:06 markus Exp $"); #include "packet.h" #include "uidswap.h" @@ -25,14 +25,11 @@ RCSID("$OpenBSD: auth-rh-rsa.c,v 1.31 2002/03/16 17:22:09 markus Exp $"); #include "auth.h" #include "canohost.h" +#include "monitor_wrap.h" + /* import */ extern ServerOptions options; -/* - * Tries to authenticate the user using the .rhosts file and the host using - * its host key. Returns true if authentication succeeds. - */ - int auth_rhosts_rsa_key_allowed(struct passwd *pw, char *cuser, char *chost, Key *client_host_key) @@ -47,7 +44,7 @@ auth_rhosts_rsa_key_allowed(struct passwd *pw, char *cuser, char *chost, chost, _PATH_SSH_SYSTEM_HOSTFILE, options.ignore_user_known_hosts ? NULL : _PATH_SSH_USER_HOSTFILE); - return (host_status == HOST_OK); + return (host_status == HOST_OK); } /* @@ -69,7 +66,7 @@ auth_rhosts_rsa(struct passwd *pw, char *cuser, Key *client_host_key) chost = (char *)get_canonical_hostname(options.verify_reverse_mapping); debug("Rhosts RSA authentication: canonical host %.900s", chost); - if (!auth_rhosts_rsa_key_allowed(pw, cuser, chost, client_host_key)) { + if (!PRIVSEP(auth_rhosts_rsa_key_allowed(pw, cuser, chost, client_host_key))) { debug("Rhosts with RSA host authentication denied: unknown or invalid host key"); packet_send_debug("Your host key cannot be verified: unknown or invalid host key."); return 0;