Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jun 1997 15:10:02 -0700 (PDT)
From:      jose@we.lc.ehu.es (Jose M. Alcaide)
To:        freebsd-bugs
Subject:   Re: bin/3891: NIS-only netgroup lookups don't work
Message-ID:  <199706182210.PAA14550@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/3891; it has been noted by GNATS.

From: jose@we.lc.ehu.es (Jose M. Alcaide)
To: FreeBSD-gnats@freebsd.org, freebsd-bugs@freebsd.org
Cc:  Subject: Re: bin/3891: NIS-only netgroup lookups don't work
Date: Wed, 18 Jun 1997 17:53:09 +0200

 I have been working a bit more on this problem. After a closer look to
 the function innetgr() in getnetgrent.c, I'm turning to think that
 there is a problem with a call to yp_match() (see getnetgrent.c, lines
 349 to 352).
 
 I have been trying the command "ypmatch" on several hosts at our network
 (some of them are SPARCs running SunOS 4.1.3, others are SGIs running IRIX 6.x,
 and also FreeBSD 2.2.1 boxes). For example,
 
   jose@tiburon[~]: ypmatch -k trusted netgroup
   trusted (polaris,-,) (sirius,-,) (vega,-,)     ......
 
 Well, this works. However,
 
   jose@tiburon[~]: ypmatch -k polaris netgroup.byhost
   Can't match key polaris in map netgroup.byhost. Reason: no such map in server's domain
 
 I get this message on all NIS (YP) clients, whatever the OS they run. Now,
 I think that the NIS server does not export any maps "netgroup.byXXX".
 I must say that our NIS server is, actually, an NIS+ server running in YP
 compatibility mode; perhaps this is the source of the problem. Unfortunately,
 I have no access to a "true" NIS server.
 
 In any case, the innetgr() implemented by other UNIXes (SunOS 4.x, IRIX
 6.x, Linux, etc.) do work. Perhaps, the FreeBSD's netgroup scheme,
 which tries to optimize NIS-only lookups, _needs_ the "netgroup.byhost"
 map; on the contrary, other UNIXes may perform a sequential lookup in the
 "netgroup" map, and this method does not need "netgroup.byhost".
 
 I have seen in the innetgr() code a "CHARITABLE" flag which, if turned on,
 forces a "standard mode" lookup if the "NIS-exclusive mode" fails. I think
 that a recompilation of getnetgrent.c with -DCHARITABLE will solve (more
 precisely, will _dissolve_) this innetgr() problem.
 
 Greetings,
 --JM
 ------------------------------------------------------------------------
 Jose M. Alcaide                         | E-mail: <jose@we.lc.ehu.es>
 Universidad del Pais Vasco              | WWW:
 Dpto. de Electricidad y Electronica     |  http://www.we.lc.ehu.es/~jose
 Facultad de Ciencias - Campus de Lejona | Phone:  +34-4-4647700 x2624
 48940 Lejona (Vizcaya) - SPAIN          | Fax:    +34-4-4858139
 ------------------------------------------------------------------------
 



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