freebsd-skq/usr.sbin
Bill Paul c904a246d2 Performace improvements/simplifications/cleanups:
- Make the child process reaper signal-driven. (Previously, we called reaper()
  once a second each time we went through the select() loop. This was
  convenient, but inefficient.)

- Increase main select() timeout from 1 second to 60 seconds and use
  this as the ping timer instead of using timestamps in the _dom_binding
  structure. This nd the reaper() change noted above makes ypbind a little
  less CPU-intensive.

- Don't flag EINTR's from select() as errors since they will happen as a
  result of incoming SIGCHLD's interrupting select().

- Prevent possible resource hogging. Currently we malloc() memory
  each time a user process asks us to establish a binding for a domain,
  but we never free it. This could lead to serious memory leakage if a
  'clever' user did something like ask ypwhich to check the bindings
  for domains 0.0.0.0.0.0.0.0.0.0 through 9.9.9.9.9.9.9.9.9.9 inclusive.
  (This would also make a mess out of the /var/yp/binding directory.)

  We now avoid this silliness by a) limiting the maximum number of
  simultaneous bindings we can manage to 200, and b) free()ing _dom_binding
  structures of secondary domains whose servers have stopped responding.
  We unlink the /var/yp/binding/domain.vers files for the free()ed
  domains too.

  (This is safe to do since a client can prod us into reestablishing the
  binding, at which time we'll simply allocate a new _dom_binding structure
  for it.)

  We keep count of the total number of domains. If asked to
  allocate more than the maximum, we return an error. I have yet to hear
  of anybody needing 200 simultaneous NIS bindings, so this should be
  enough. (I chose the number 200 arbitrarily. It can be increased if need
  be.)

- Changed "server not responding"/"server OK" messages to display server
  IP addresses again since it looks spiffier.

- Use daemon() to daemonify ourselves,

- Added a SIGTERM handler that removes all binding files and unregisters
  the ypbind service from the portmapper when a SIGTERM in received.

- The comment 'blow away everything in BINDINGDIR' has no associated code.
  Give it some: clean out /var/yp/binding at startup (if it exists).

This completes my ypbind wishlist. Barring bug fixes, I shouldn't need to
go poking around in here anymore. (Of course, this means I can start
working on my ypserv whishlist now... :)
1995-05-10 23:02:41 +00:00
..
ac
accton
adduser Don't accept usernames longer than 8 characters 1995-04-30 19:20:25 +00:00
amd Change /lib/cpp to /usr/bin/cpp 1995-05-08 16:50:19 +00:00
apm
apmconf
arp
bad144 - Don't write the label if the (undocumented) nflag is set. 1995-04-15 21:59:26 +00:00
bootparamd Stop callbootd from dumping core when attempting to directly query a 1995-03-26 03:15:39 +00:00
bootpd
bootpef
bootpgw
bootptest
cdplay
chown
chroot
config Change the perennially annoying reminder to "make depend" (which may or 1995-05-03 20:16:57 +00:00
config.new
cron Fix nested comments for -Wcomment warnings. 1995-05-09 12:48:21 +00:00
crunch
ctm Check for i/o errors in fclose() so that a full disk doesn't almost 1995-04-16 22:40:49 +00:00
dbsym
dev_mkdb
diskpart
edquota Cast some expressions involving dbtob() to (unsigned long) and print them 1995-05-07 07:48:35 +00:00
eeprom
fdcontrol
fdformat
fdwrite
inetd
iostat
kbdcontrol
kbdmap Manpage not installed 1995-04-06 14:41:50 +00:00
kernbb Don't dereference NULL pointers. 1995-04-28 04:58:19 +00:00
kgmon
kvm_mkdb
lpr Close PR: 1995-04-27 04:56:10 +00:00
lptcontrol
lsdev
manctl
mixer
mount_portalfs Bugfixes : 1995-04-19 12:24:08 +00:00
mountd Fixed stupid bug in mountd: it would seem that the kernel doesn't allow 1995-03-26 23:36:38 +00:00
mrouted there is a endian problem when setting up tunnel and phyint boundaries 1995-04-10 18:42:10 +00:00
mtree
named Fix nested comments for -Wcomment warnings. 1995-05-09 12:48:21 +00:00
ncrcontrol
nfsd
nologin
nslookup
pcvt Fix nested comments for -Wcomment warnings. 1995-05-09 12:48:21 +00:00
pkg_install Fix a long-standing bug that broke pkg_info utterly and probably made 1995-05-10 23:00:16 +00:00
pkg_manage Commit the latest version of this. This version appears to handle package 1995-04-24 13:01:04 +00:00
portmap
ppp Remove FreeBSD-specific setre*() cheat, we have working thing now 1995-04-29 13:38:14 +00:00
pppd Close sec. hole: can exec pgm with more groups than calling user have 1995-04-29 13:55:34 +00:00
pppstats
pstat Add FreeBSD-specific TS_* states 1995-05-07 23:19:53 +00:00
pwd_mkdb Add what looks to be the right fix to this bogus code. 1995-03-24 16:07:09 +00:00
quot
quotaon
rarpd Get rid of ether_addr.c: it's been moved to libc. Also add proper 1995-04-02 01:35:54 +00:00
repquota Fix 3 fatal mismatches in format args involving dbtob() and 7 nonfatal 1995-05-07 08:13:37 +00:00
rmt The rmt protocol didn't allow to pass a file creation mode (permission 1995-04-09 09:20:47 +00:00
routed
rtprio
rwhod
sa
sade Don't use curses routines until that part of the system is initialized. 1995-05-10 18:59:51 +00:00
sendmail Fix nested includes for -Wcomment. 1995-05-09 12:35:29 +00:00
sgsc
sliplogin
slstat
spkrtest
swapinfo
sysctl
sysinstall Don't use curses routines until that part of the system is initialized. 1995-05-10 18:59:51 +00:00
syslogd
tcpdump
timed
traceroute
trpt Removed bogus #include of netinet/in_pcb.h 1995-04-10 00:41:25 +00:00
trsp
tzsetup Grand new all-singing, dialog-wielding tzsetup(8). Still needs a man page. 1995-04-24 21:04:35 +00:00
update
vidcontrol
vipw
vnconfig
watch
XNSrouted
xntpd Do what the previous log message claimed to do and don't enable DES if 1995-04-16 01:40:24 +00:00
xten Switch from bogus absolute path to a relative one. 1995-05-09 23:48:54 +00:00
ypbind Performace improvements/simplifications/cleanups: 1995-05-10 23:02:41 +00:00
yppoll
ypset
zic
Makefile Add mixer to the clean/cleandir targets to get it also cleaned up. 1995-04-15 21:45:49 +00:00
Makefile.inc