From c17942ca57ed3d5050b7674d696b098307c77b86 Mon Sep 17 00:00:00 2001 From: Bill Paul Date: Sat, 11 Oct 1997 00:03:25 +0000 Subject: 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. --- lib/libc/gen/getnetgrent.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/libc/gen/getnetgrent.c b/lib/libc/gen/getnetgrent.c index 662958aebc04..ba4c1470f8bf 100644 --- a/lib/libc/gen/getnetgrent.c +++ b/lib/libc/gen/getnetgrent.c @@ -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 #include #include -- cgit v1.3