Allow blank lines in /var/yp/securenets.

This commit is contained in:
Dag-Erling Smørgrav 1998-07-15 11:56:28 +00:00
parent 1be1e72fd8
commit 19111ad381
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=37681

View file

@ -33,7 +33,7 @@
#ifndef lint
static const char rcsid[] =
"$Id$";
"$Id: yp_access.c,v 1.15 1997/10/29 07:25:02 charnier Exp $";
#endif /* not lint */
#include <stdlib.h>
@ -147,7 +147,8 @@ void load_securenets()
while(fgets(linebuf, LINEBUFSZ, fp)) {
char addr1[20], addr2[20];
if (linebuf[0] == '#')
if ((linebuf[0] == '#')
|| (strspn(linebuf, " \t\r\n") == strlen(linebuf)))
continue;
if (sscanf(linebuf, "%s %s", addr1, addr2) < 2) {
yp_error("badly formatted securenets entry: %s",