Subject: lib/14628:
To: None <>
From: Kimmo Suominen <>
List: netbsd-bugs
Date: 11/18/2001 17:16:04
>Number:         14628
>Category:       lib
>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
>Originator:     Kimmo Suominen
>Release:        2001-07-27
System: NetBSD 1.5X NetBSD 1.5X (GW-GENERIC) #36: Sat Jul 28 11:41:19 EDT 2001 i386
Architecture: i386
Machine: i386
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.
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.
The code in getnetgrent(3) should skip elements that are "-".