NetBSD Problem Report #14628

Received: (qmail 14100 invoked from network); 18 Nov 2001 22:16:04 -0000
Message-Id: <>
Date: Sun, 18 Nov 2001 17:16:04 -0500 (EST)
From: (Kimmo Suominen)
Subject: getnetgrent(3) fails on null netgroup entry
X-Send-Pr-Version: 3.95

>Number:         14628
>Category:       lib
>Synopsis:       getnetgrent(3) fails on null netgroup entry
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 18 22:17:01 +0000 2001
>Last-Modified:  Sat Feb 02 20:31:45 +0000 2002
>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 "-".

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.