NetBSD Problem Report #14628

Received: (qmail 14100 invoked from network); 18 Nov 2001 22:16:04 -0000
Message-Id: <20011118221604.3EE157E29@beowulf.gw.com>
Date: Sun, 18 Nov 2001 17:16:04 -0500 (EST)
From: kim@tac.nyc.ny.us (Kimmo Suominen)
To: gnats-bugs@gnats.netbsd.org
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
>Closed-Date:    
>Last-Modified:  Sat Feb 02 20:31:45 +0000 2002
>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:

NetBSD Home
NetBSD PR Database Search

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