Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Oct 2002 13:20:04 -0700 (PDT)
From:      Lyndon Nerenberg <lyndon@orthanc.ab.ca>
To:        freebsd-bugs@FreeBSD.org
Subject:   bin/39671 mknetid segfaults on default /etc/master pwd file
Message-ID:  <200210062020.g96KK4Jm025129@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/39671; it has been noted by GNATS.

From: Lyndon Nerenberg <lyndon@orthanc.ab.ca>
To: freebsd-gnats-submit@freebsd.org, dirkx@covalent.net
Cc:  
Subject: bin/39671 mknetid segfaults on default /etc/master pwd file
Date: Sun, 06 Oct 2002 14:16:02 -0600

 This patch to /usr/src/libexec/mknetid/mknetid.c fixes the
 problem.
 
 --lyndon
 
 http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/39671
 
 Index: mknetid.c
 ===================================================================
 RCS file: /home/ncvs/src/libexec/mknetid/mknetid.c,v
 retrieving revision 1.11
 diff -u -r1.11 mknetid.c
 --- mknetid.c	1999/08/28 00:09:41	1.11
 +++ mknetid.c	2002/10/06 20:11:30
 @@ -182,6 +182,8 @@
  	 * group information we just stored if necessary.
  	 */
  	while(fgets(readbuf, LINSIZ, pfp)) {
 +		if (readbuf[0] == '#')
 +			continue;	/* ignore comment lines */
  		if ((ptr = strchr(readbuf, ':')) == NULL)
  			warnx("bad passwd file entry: %s", readbuf);
  		*ptr = '\0';

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210062020.g96KK4Jm025129>