version 1.19, 2000/12/21 15:10:16 |
version 1.20, 2001/01/19 15:55:10 |
|
|
#include <openssl/dsa.h> |
#include <openssl/dsa.h> |
#include "key.h" |
#include "key.h" |
#include "hostfile.h" |
#include "hostfile.h" |
|
#include "pathnames.h" |
|
|
/* |
/* |
* Tries to authenticate the user using the .rhosts file and the host using |
* Tries to authenticate the user using the .rhosts file and the host using |
|
|
found = key_new(KEY_RSA1); |
found = key_new(KEY_RSA1); |
|
|
/* Check if we know the host and its host key. */ |
/* Check if we know the host and its host key. */ |
host_status = check_host_in_hostfile(SSH_SYSTEM_HOSTFILE, canonical_hostname, |
host_status = check_host_in_hostfile(_PATH_SSH_SYSTEM_HOSTFILE, canonical_hostname, |
client_key, found, NULL); |
client_key, found, NULL); |
|
|
/* Check user host file unless ignored. */ |
/* Check user host file unless ignored. */ |
if (host_status != HOST_OK && !options.ignore_user_known_hosts) { |
if (host_status != HOST_OK && !options.ignore_user_known_hosts) { |
struct stat st; |
struct stat st; |
char *user_hostfile = tilde_expand_filename(SSH_USER_HOSTFILE, pw->pw_uid); |
char *user_hostfile = tilde_expand_filename(_PATH_SSH_USER_HOSTFILE, pw->pw_uid); |
/* |
/* |
* Check file permissions of SSH_USER_HOSTFILE, auth_rsa() |
* Check file permissions of _PATH_SSH_USER_HOSTFILE, auth_rsa() |
* did already check pw->pw_dir, but there is a race XXX |
* did already check pw->pw_dir, but there is a race XXX |
*/ |
*/ |
if (options.strict_modes && |
if (options.strict_modes && |