summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/getnetgrent.c
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1997-10-11 00:03:25 +0000
committerwpaul <wpaul@FreeBSD.org>1997-10-11 00:03:25 +0000
commit0fffdd6061a0a089b2a0114f5a6a3e1e2799ce3b (patch)
treee584f5d3dfc92b78a6e0bbe70b078be875b3ca6f /lib/libc/gen/getnetgrent.c
parentf1a5d63a7bec886a7d5f6de806436c94bbe85ef5 (diff)
downloadFreeBSD-src-0fffdd6061a0a089b2a0114f5a6a3e1e2799ce3b.zip
FreeBSD-src-0fffdd6061a0a089b2a0114f5a6a3e1e2799ce3b.tar.gz
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.
Diffstat (limited to 'lib/libc/gen/getnetgrent.c')
-rw-r--r--lib/libc/gen/getnetgrent.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libc/gen/getnetgrent.c b/lib/libc/gen/getnetgrent.c
index 662958a..ba4c147 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 <rpc/rpc.h>
#include <rpcsvc/yp_prot.h>
#include <rpcsvc/ypclnt.h>
OpenPOWER on IntegriCloud