mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-28 16:43:09 +00:00
Allow blank lines in /var/yp/securenets.
This commit is contained in:
parent
1be1e72fd8
commit
19111ad381
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=37681
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user