From owner-cvs-lib Mon Oct 13 10:11:41 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id KAA07707 for cvs-lib-outgoing; Mon, 13 Oct 1997 10:11:41 -0700 (PDT) (envelope-from owner-cvs-lib) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id KAA07608; Mon, 13 Oct 1997 10:10:05 -0700 (PDT) (envelope-from wpaul@FreeBSD.org) From: Bill Paul Received: (from wpaul@localhost) by freefall.freebsd.org (8.8.6/8.8.5) id KAA19745; Mon, 13 Oct 1997 10:09:17 -0700 (PDT) Date: Mon, 13 Oct 1997 10:09:17 -0700 (PDT) Message-Id: <199710131709.KAA19745@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-lib@FreeBSD.ORG Subject: cvs commit: src/lib/libc/gen getnetgrent.c Sender: owner-cvs-lib@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk wpaul 1997/10/13 10:09:17 PDT Modified files: lib/libc/gen getnetgrent.c Log: Improve the innetgr() NIS+ compat kludge. We should only fail over to the 'slow' lookup if we get a YPERR_MAP (no such map in server's domain) error instead of failing over on any error. In the latter case, if the 'fast' search fails legitimately (i.e. the user or host really isn't a member of the specified netgroup) then we end up doing the 'slow' search and failing all over again. The result is still correct, but cycles are consumed for no good reason. Also removed the #ifdef CHARITABLE since the compat kludge is no longer optional. Revision Changes Path 1.22 +25 -18 src/lib/libc/gen/getnetgrent.c