diff --git a/lib/ip/ruserok.c b/lib/ip/ruserok.c index ad6651771..ec00a792f 100755 --- a/lib/ip/ruserok.c +++ b/lib/ip/ruserok.c @@ -12,6 +12,7 @@ */ #include +#include #include #include #include @@ -177,7 +178,12 @@ int iruserok(unsigned long raddr, int superuser, (void)strcat(pbuf, "/.rhosts"); } - if ((hostf = fopen(pbuf, "r")) == NULL) return (-1); + if ((hostf = fopen(pbuf, "r")) == NULL) + { + if (errno == ENOENT) + continue; + return (-1); + } r = __ivaliduser(hostf, raddr, luser, ruser); (void)fclose(hostf);