version 1.28.4.2, 2004/03/04 18:18:15 |
version 1.29, 2003/04/08 20:21:28 |
|
|
* This should be safe because each buffer is as big as the |
* This should be safe because each buffer is as big as the |
* whole string, and thus cannot be overwritten. |
* whole string, and thus cannot be overwritten. |
*/ |
*/ |
switch (sscanf(buf, "%1023s %1023s %1023s", hostbuf, userbuf, |
switch (sscanf(buf, "%s %s %s", hostbuf, userbuf, dummy)) { |
dummy)) { |
|
case 0: |
case 0: |
auth_debug_add("Found empty line in %.100s.", filename); |
auth_debug_add("Found empty line in %.100s.", filename); |
continue; |
continue; |
|
|
{ |
{ |
const char *hostname, *ipaddr; |
const char *hostname, *ipaddr; |
|
|
hostname = get_canonical_hostname(options.use_dns); |
hostname = get_canonical_hostname(options.verify_reverse_mapping); |
ipaddr = get_remote_ipaddr(); |
ipaddr = get_remote_ipaddr(); |
return auth_rhosts2(pw, client_user, hostname, ipaddr); |
return auth_rhosts2(pw, client_user, hostname, ipaddr); |
} |
} |
|
|
|
|
debug2("auth_rhosts2: clientuser %s hostname %s ipaddr %s", |
debug2("auth_rhosts2: clientuser %s hostname %s ipaddr %s", |
client_user, hostname, ipaddr); |
client_user, hostname, ipaddr); |
|
|
|
/* no user given */ |
|
if (pw == NULL) |
|
return 0; |
|
|
/* Switch to the user's uid. */ |
/* Switch to the user's uid. */ |
temporarily_use_uid(pw); |
temporarily_use_uid(pw); |