Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Dec 1997 12:06:01 -0800 (PST)
From:      croehrig@house.org
To:        freebsd-gnats-submit@FreeBSD.ORG
Subject:   bin/5345: NIS netgroup lookups (innetgr) don't work properly under 2.2.5-RELEASE
Message-ID:  <199712192006.MAA13840@hub.freebsd.org>
Resent-Message-ID: <199712192010.MAA14114@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         5345
>Category:       bin
>Synopsis:       NIS netgroup lookups (innetgr) don't work properly under 2.2.5-RELEASE
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 19 12:10:01 PST 1997
>Last-Modified:
>Originator:     Chris Roehrig
>Organization:
University of British Columbia
>Release:        2.2.5-RELEASE
>Environment:
FreeBSD javanica.house.org 2.2.5-STABLE FreeBSD 2.2.5-STABLE #0: Wed Dec 17 08:13:26 PST 1997     croehrig@javanica.house.org:/Mounts/Local2/FreeBSD/2.2-STABLE/src/sys/compile/JAVANICA  i386
>Description:

innetgr seems to be broken in 2.2.5-RELEASE.

I just upgraded from 2.2.1-RELEASE where netgroups worked fine, and now lookups  
don't work properly.   When a host belongs to more than one netgroup, innetgr  
seems to ignore the one listed last.


>How-To-Repeat:
Set up a netgroup map using a netgroup file like:
allhosts (good,,) (bad,,)
zallhosts (good,,) (bad,,)
badhosts (bad,,)

% ypcat -k netgroup.byhost
good.* allhosts,zallhosts
bad.* allhosts,badhosts,zallhosts

The output of the following program:
#include <stdio.h>
void main( int argc, char *argv[] )
{    printf("innetgr(%s,%s,NULL,NULL)   ->  %d\n", 
        argv[1], argv[2],innetgr(argv[1], argv[2], NULL, NULL ) ); }

Gives:
innetgr(allhosts,good,NULL,NULL)   ->  1
innetgr(allhosts,bad,NULL,NULL)   ->  1
innetgr(badhosts,good,NULL,NULL)   ->  0
innetgr(badhosts,bad,NULL,NULL)   ->  1
innetgr(zallhosts,good,NULL,NULL)   ->  0
innetgr(zallhosts,bad,NULL,NULL)   ->  0

The last two tests are incorrect.

>Fix:

>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712192006.MAA13840>