Small tweak to the group parsing code to stop it from core dumping
on malformed /etc/group entries. This is a band-aid until I can pull in the newer group parsing code from getgrent . Pointed out by: branson@belmakor.hq.ferg.com (Branson Matheson)
This commit is contained in:
parent
e8adebf242
commit
48d26cf410
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=25969
@ -36,7 +36,7 @@ static const char sccsid[] = "@(#)getgrent.c 8.2 (Berkeley) 3/21/94";
|
|||||||
#endif /* LIBC_SCCS and not lint */
|
#endif /* LIBC_SCCS and not lint */
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static const char rcsid[] = "$Id$";
|
static const char rcsid[] = "$Id: parse_group.c,v 1.3 1997/02/22 14:21:54 peter Exp $";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -141,6 +141,8 @@ grscan(search, gid, name)
|
|||||||
if (search && name == NULL && _gr_group.gr_gid != gid)
|
if (search && name == NULL && _gr_group.gr_gid != gid)
|
||||||
continue;
|
continue;
|
||||||
cp = NULL;
|
cp = NULL;
|
||||||
|
if (bp == NULL) /* !! Must check for this! */
|
||||||
|
break;
|
||||||
for (m = _gr_group.gr_mem = members;; bp++) {
|
for (m = _gr_group.gr_mem = members;; bp++) {
|
||||||
if (m == &members[MAXGRP - 1])
|
if (m == &members[MAXGRP - 1])
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user