version 1.52, 2001/04/12 19:15:24 |
version 1.53, 2001/04/18 22:03:44 |
|
|
const char *resolvedname, *ipaddr, *lookup; |
const char *resolvedname, *ipaddr, *lookup; |
struct stat st; |
struct stat st; |
char *user_hostfile; |
char *user_hostfile; |
int host_status; |
int host_status, len; |
|
|
resolvedname = get_canonical_hostname(options.reverse_mapping_check); |
resolvedname = get_canonical_hostname(options.reverse_mapping_check); |
ipaddr = get_remote_ipaddr(); |
ipaddr = get_remote_ipaddr(); |
|
|
debug2("userauth_hostbased: resolvedname %s ipaddr %s", |
debug2("userauth_hostbased: chost %s resolvedname %s ipaddr %s", |
resolvedname, ipaddr); |
chost, resolvedname, ipaddr); |
|
|
if (options.hostbased_uses_name_from_packet_only) { |
if (options.hostbased_uses_name_from_packet_only) { |
if (auth_rhosts2(pw, cuser, chost, chost) == 0) |
if (auth_rhosts2(pw, cuser, chost, chost) == 0) |
return 0; |
return 0; |
lookup = chost; |
lookup = chost; |
} else { |
} else { |
|
if (((len = strlen(chost)) > 0) && chost[len - 1] == '.') { |
|
debug2("stripping trailing dot from chost %s", chost); |
|
chost[len - 1] = '\0'; |
|
} |
if (strcasecmp(resolvedname, chost) != 0) |
if (strcasecmp(resolvedname, chost) != 0) |
log("userauth_hostbased mismatch: " |
log("userauth_hostbased mismatch: " |
"client sends %s, but we resolve %s to %s", |
"client sends %s, but we resolve %s to %s", |