version 1.2, 1999/09/28 04:45:35 |
version 1.3, 1999/09/29 21:14:15 |
|
|
continue; /* Empty line? */ |
continue; /* Empty line? */ |
case 1: |
case 1: |
/* Host name only. */ |
/* Host name only. */ |
strncpy(userbuf, server_user, sizeof(userbuf)); |
strlcpy(userbuf, server_user, sizeof(userbuf)); |
userbuf[sizeof(userbuf) - 1] = 0; |
|
break; |
break; |
case 2: |
case 2: |
/* Got both host and user name. */ |
/* Got both host and user name. */ |
|
|
rhosts_file_index++) |
rhosts_file_index++) |
{ |
{ |
/* Check users .rhosts or .shosts. */ |
/* Check users .rhosts or .shosts. */ |
sprintf(buf, "%.500s/%.100s", |
snprintf(buf, sizeof buf, "%.500s/%.100s", |
pw->pw_dir, rhosts_files[rhosts_file_index]); |
pw->pw_dir, rhosts_files[rhosts_file_index]); |
if (stat(buf, &st) >= 0) |
if (stat(buf, &st) >= 0) |
break; |
break; |
|
|
rhosts_file_index++) |
rhosts_file_index++) |
{ |
{ |
/* Check users .rhosts or .shosts. */ |
/* Check users .rhosts or .shosts. */ |
sprintf(buf, "%.500s/%.100s", |
snprintf(buf, sizeof buf, "%.500s/%.100s", |
pw->pw_dir, rhosts_files[rhosts_file_index]); |
pw->pw_dir, rhosts_files[rhosts_file_index]); |
if (stat(buf, &st) < 0) |
if (stat(buf, &st) < 0) |
continue; /* No such file. */ |
continue; /* No such file. */ |