From owner-freebsd-commit Sun Apr 9 12:26:34 1995 Return-Path: commit-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id MAA29827 for commit-outgoing; Sun, 9 Apr 1995 12:26:34 -0700 Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id MAA29814 for cvs-lib-outgoing; Sun, 9 Apr 1995 12:26:30 -0700 Received: (from wpaul@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id MAA29804 ; Sun, 9 Apr 1995 12:26:25 -0700 Date: Sun, 9 Apr 1995 12:26:25 -0700 From: Bill Paul Message-Id: <199504091926.MAA29804@freefall.cdrom.com> To: CVS-commiters, cvs-lib Subject: cvs commit: src/lib/libc/yp yplib.c Sender: commit-owner@FreeBSD.org Precedence: bulk wpaul 95/04/09 12:26:25 Modified: lib/libc/yp yplib.c Log: Fix behavior of YP library routines in environments with multiple domains, where one or more of the non-default domains are not yet bound. If we make a YP request for a domain other than the default domain, and there is no binding for the new domain yet, _yp_dobind() sees that the /var/yp/binding/DOMAIN.VERS file for the unbound domain is not locked (by ypbind) and from this it concludes that the NIS system is dead, so it gives up. This behavior has been changed: before giving up in this case, we now make a second check to see if the binding file for the *default* domain is also not locked. Only if the default domain binding file is also unlocked to we now assume that ypbind has bought the farm and bail out. (Note: this assumes that the user hasn't changed the default domain while ypbind is running.) With this change, _do_ypbind() is allowed to proceed into the next section of code wherein it prods ypbind into establishing a binding for the new domain. This first call times out after ten seconds, after which it should retry and succeed. From then on, the binding for the second domain should be handled normally.