Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Mar 1996 14:48:21 -0800 (PST)
From:      Bill Paul <wpaul>
To:        CVS-committers, cvs-all, cvs-lib
Subject:   cvs commit:  src/lib/libc/yp yplib.c
Message-ID:  <199603232248.OAA17202@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
wpaul       96/03/23 14:48:21

  Modified:    lib/libc/yp  yplib.c
  Log:
  Don't bother trying to flock() /var/run/ypbind.lock; this breaks when
  /var/run resides on an NFS filesystem (flock() always returns 0 in
  this case, so we falsely assume that ypbind is dead and bail out).
  
  Settle instead for better failure checking when using clnttcp_create()
  and clnt_call() to interact with ypbind. We still try to flock()
  /var/yp/binding/$DOMAINNAME.2, but if this doesn't work, we drop into
  the code that retrieves the binding information from ypbind directly.
  If that also fails, then we're toast. On NFS filesystems, this means
  we'll be ignoring the binding file for no reason and always talking to
  ypbind even though we don't have to, but at least things will work.
  
  (I could just replace the flock(/var/run/ypbind.lock) check with
  an RPC call to ypbind's NULLPROC procedure, but if the flock() of
  the binding file doesn't pan out we're going to try to talk to
  ypbind later anyway. *sigh* Is NFS file locking ever going to work?)
  
  Revision  Changes    Path
  1.17      +14 -21    src/lib/libc/yp/yplib.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603232248.OAA17202>