diff options
author | des <des@FreeBSD.org> | 1998-07-15 11:56:28 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 1998-07-15 11:56:28 +0000 |
commit | cea29ea511d3ae5ee2696d57f192e3f7fc82c6d9 (patch) | |
tree | 8a0bb858f5c687724af9fdef0ba725fa04cad555 | |
parent | b38d9009d3260f9a56110b5860be90f05b708904 (diff) | |
download | FreeBSD-src-cea29ea511d3ae5ee2696d57f192e3f7fc82c6d9.zip FreeBSD-src-cea29ea511d3ae5ee2696d57f192e3f7fc82c6d9.tar.gz |
Allow blank lines in /var/yp/securenets.
-rw-r--r-- | usr.sbin/ypserv/yp_access.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ypserv/yp_access.c b/usr.sbin/ypserv/yp_access.c index bb869f2..9d61afc 100644 --- a/usr.sbin/ypserv/yp_access.c +++ b/usr.sbin/ypserv/yp_access.c @@ -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", |