From owner-freebsd-bugs Fri Dec 19 12:10:06 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA14123 for bugs-outgoing; Fri, 19 Dec 1997 12:10:06 -0800 (PST) (envelope-from owner-freebsd-bugs) Received: (from gnats@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA14114; Fri, 19 Dec 1997 12:10:02 -0800 (PST) (envelope-from gnats) Resent-Date: Fri, 19 Dec 1997 12:10:02 -0800 (PST) Resent-Message-Id: <199712192010.MAA14114@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, croehrig@house.org Received: (from nobody@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA13840; Fri, 19 Dec 1997 12:06:01 -0800 (PST) (envelope-from nobody) Message-Id: <199712192006.MAA13840@hub.freebsd.org> Date: Fri, 19 Dec 1997 12:06:01 -0800 (PST) From: croehrig@house.org To: freebsd-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: www-1.0 Subject: bin/5345: NIS netgroup lookups (innetgr) don't work properly under 2.2.5-RELEASE Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >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 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: