NIS+ compatibility kludge. A long time ago, I set up innetgr() so

that if searching through the special netgroup.byhost or netgroup.byuser
maps didn't work, we would roll over to the 'slow' method of grovelling
though the netgroup map and working out the dependencies on the fly.
But I left this option hidden inside an #ifdef CHARITABLE since I
didn't think I'd ever need it.

Well, the Sun rpc.nisd NIS+ server in YP compat mode doesn't support
the .byhost and .byuser reverse maps, so the  failover is necessary
in order to be compatible. *sigh*

This closes PR #3891, and should be merged into RELENG_2_2.
This commit is contained in:
Bill Paul 1997-10-11 00:03:25 +00:00
parent 8c85509d0a
commit c17942ca57

View File

@ -82,6 +82,13 @@ static char sccsid[] = "@(#)getnetgrent.c 8.2 (Berkeley) 4/27/95";
* netgroup entries, we use just those local entries and ignore
* NIS (this is the original, pre-NIS behavior).
*/
/*
* NIS+ servers in YP emulation mode suport only the netgroup map
* (they have no netgroup.byhost and netgroup.byuser 'reverse' maps)
* so we need this for compatibility.
*/
#define CHARITABLE
#include <rpc/rpc.h>
#include <rpcsvc/yp_prot.h>
#include <rpcsvc/ypclnt.h>