freebsd-dev/lib/libc
Bill Paul 0f98415ed4 - Make _do_ypbind() check for /var/run/ypbind.lock and attempt to flock()
it before before trying to establish a binding. If /var/run/ypbind.lock
  doesn't exist, or if it exists and isn't locked, then ypbind isn't
  running, which means NIS is either turned off or hosed.

- Have _yp_check() call yp_unbind() after it sucessfully calls yp_bind()
  to make sure it frees resources correctly. (I don't think there's really
  a memory leak here, but it seems somehow wrong to call yp_bind() without
  making a corresponding call to yp_unbind() afterwards.)

This makes the NIS code behave a little better in cases where libc makes
calls to NIS, but it isn't running correctly (i.e. there's no ypbind).

This cleans up some strange libc behavior that manifests itself if
you have the system domain name set, but aren't actually running NIS.
In this event, the getrpcent(3) code could try to call into NIS and
cause several inexplicable "clnttcp_create error: RPC program not
registered" messages to appear. This happens because _yp_check() checks
if the system domain name is set and, if it is, proceeds to call
yp_bind() to attempt to establish a binding. Since there is no
binding file (remember: ypbind isn't running, so /var/yp/binding
will be empty), _yp_dobind() will attempt to contact ypbind to
prod it into binding the domain. And because ypbind isn't running,
the code generates the 'clnttcp_create' error. Ultimately the
_yp_check() fails and the getrpcent(3) code rolls over to the /etc/rpc
file, but the error messages are annoying, and the code should be
smart enough to forgo the binding attempt when NIS is turned off.
1995-11-05 05:39:04 +00:00
..
amd64 remove GCC support functions from libc. 1995-10-05 10:24:57 +00:00
compat-43 Remove setre*id*. 1995-04-25 10:00:04 +00:00
db Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
gen Add #include <sys/user.h>. 1995-10-28 16:14:18 +00:00
gmon Add moncontrol.3 -> monstartup.3 link here. 1995-10-15 17:40:20 +00:00
i386 remove GCC support functions from libc. 1995-10-05 10:24:57 +00:00
locale Move more stuff out to XPG4 1995-11-03 08:59:02 +00:00
net Add NIS support to getservent(3) functions (getservbyport() and getservbyname() 1995-11-04 19:07:27 +00:00
nls and so on... 1995-10-22 14:39:22 +00:00
quad limit the number of functions we pull in for 'i386'. 1995-10-22 14:40:17 +00:00
regex More cleanup. 1995-10-22 14:40:55 +00:00
rpc misc typos 1995-10-27 16:56:53 +00:00
stdio Minor cleanup, #include's and unused vars. 1995-10-22 14:52:30 +00:00
stdlib Mino cleanup, #includes & unused vars. 1995-10-22 14:53:17 +00:00
stdtime Don't reset LC_TIME to C when it isn't neccessary 1995-10-23 19:52:43 +00:00
string Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
sys Document recent changes in socket buffers and listen(2). 1995-11-03 18:34:38 +00:00
xdr minor cleanup, #includes. 1995-10-22 14:53:58 +00:00
yp - Make _do_ypbind() check for /var/run/ypbind.lock and attempt to flock() 1995-11-05 05:39:04 +00:00
Makefile Bump shlib minor because xdr_* functions have been enabled. Do NOT 1995-08-09 06:50:52 +00:00