Subject: lib/14628:
To: None <gnats-bugs@gnats.netbsd.org>
From: Kimmo Suominen <kim@tac.nyc.ny.us>
List: netbsd-bugs
Date: 11/18/2001 17:16:04
>Number:         14628
>Category:       lib
>Synopsis:       
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 18 14:17:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Kimmo Suominen
>Release:        2001-07-27
>Organization:
>Environment:
System: NetBSD beowulf.gw.com 1.5X NetBSD 1.5X (GW-GENERIC) #36: Sat Jul 28 11:41:19 EDT 2001 kim@nix.suominen.org:/net/nix/src-3/NetBSD/cvsroot/src/sys/arch/i386/compile/GW-GENERIC i386
Architecture: i386
Machine: i386
>Description:
To denote an empty entry (no valid value) in a netgroup one uses
a hyphen "-" as the value.  However, getnetgrent returns this value
to the called as "-", which it shouldn't.
>How-To-Repeat:
Create a netgroup like this:

	test (-,-,)

Then use "netgroup test" and you'll see "-" returned.  This is even
worse when a group consist of multiple groups, some of which are
empty.  Multiple "-" entries will be returned.
>Fix:
The code in getnetgrent(3) should skip elements that are "-".
>Release-Note:
>Audit-Trail:
>Unformatted: