From fenner@parc.xerox.com  Tue Jun 13 14:37:23 1995
Received: from alpha.xerox.com (alpha.Xerox.COM [13.1.64.93])
          by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id OAA18236
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 13 Jun 1995 14:37:23 -0700
Received: from baobab.parc.xerox.com ([13.2.116.113]) by alpha.xerox.com with SMTP id <14456(1)>; Tue, 13 Jun 1995 14:36:30 PDT
Received: (from fenner@localhost) by baobab.parc.xerox.com (8.6.11/8.6.9) id OAA08511; Tue, 13 Jun 1995 14:40:20 -0700
Message-Id: <199506132140.OAA08511@baobab.parc.xerox.com>
Date: Tue, 13 Jun 1995 14:40:20 PDT
From: Bill Fenner <fenner@parc.xerox.com>
Reply-To: fenner@parc.xerox.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: netgroup cycle detection is broken
X-Send-Pr-Version: 3.2

>Number:         509
>Category:       bin
>Synopsis:       netgroup cycle detection is too "greedy"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 13 14:40:00 1995
>Closed-Date:    Mon Aug 14 17:06:39 PDT 1995
>Last-Modified:  Mon Aug 14 17:16:46 PDT 1995
>Originator:     Bill Fenner
>Release:        FreeBSD 2.0-BUILT-19950527 i386
>Organization:
Xerox PARC
>Environment:

	
	FreeBSD 2.0.5-ALPHA
	running NIS in existing, largely Sun environment

>Description:

	
	getnetgrent() claims that there is a loop in the netgroup
	parc-decsD.  The problem is actually that the netgroup
	sun-access02D contains parc-decsD twice:

% ypmatch sun-access02D netgroup
parc-abekasD    parc-irisD      parc-vaxsD      parc-decsD      parc-ibmsD     parc-ncdsD       parc-decsD      parc-annexD

	Since it has visited the node before, it decides that there
	is a cycle in parc-decsD.


>How-To-Repeat:

	
	Create a netgroups file similar to:

	foo bar bar
	bar (baz,-,MYDOMAIN)

	getnetgrent() will complain that there is a cycle in bar.


>Fix:
	
	
	Not clear.  It's clearly less than ideal to list the same subgroup
	twice in the same netgroup entry, but it's also clear that the problem
	is not that there is a cycle.  Might be fixing the error message,
	might be fixing the checks.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: wpaul 
State-Changed-When: Mon Aug 14 17:06:39 PDT 1995 
State-Changed-Why:  
The cycle-detection code actually does the Right Thing (tm) 
(it catches the duplicate instances of members in a netgroup 
and discards them before proceeding along its merry way), 
it's just a little noisy about it. The warning has been hidden under 
an #ifdef DEBUG since it could be considered overkill, and 
for the sake of compatibility with other platforms which don't 
tend to complain in this situation either (which is most of them). 
>Unformatted:


