Commit Graph

37 Commits

Author SHA1 Message Date
bouyer fe94b8f229 - Makes ypbind use syslog() (with LOG_DAEMON) instead of warn()/err().
Messages will still be printed to stderr if ypbind is started in debug mode.
- Don't exist if none of the servers listed in
  /var/yp/binding/<domainname>.ypservers are reacheable. It's a temporary
  failure that can be recovered from.
1998-08-21 09:39:04 +00:00
mrg 99b44231f5 minor KNF nits. 1998-07-13 12:01:03 +00:00
lukem e8664c7183 revert; we can't break the existing ABI and API 1998-02-12 03:32:51 +00:00
lukem f18da82e69 use u_int32_t instead of u_long 1998-02-10 06:32:42 +00:00
thorpej 1569c18c63 Fix typo in previous. 1997-07-18 23:08:45 +00:00
thorpej 1c4fcb7069 Cast pointers to u_long before casting to another integral type. 1997-07-18 23:07:44 +00:00
thorpej e17f9e900e Teensy change to use WARNS. 1997-07-18 07:57:55 +00:00
lukem d65e85e261 * use _yp_invalid_domain() (from libc) to validate the domainnames
* cleanup for -Wall
* use __RCSID

the following were inspired by openbsd:
* only allow connections from reserved ports
* implement -insecure, which turns off the above restriction (required
  for sunos 3.x and ultrix)
* prevent more than 100 domains from being bound at once, preventing
  a denial of service attacks
1997-07-07 02:27:05 +00:00
thorpej 54ab7c44c8 Change name of ypservers file to /var/yp/binding/domain.ypservers.
This is a compromise between the Solaris 2.5 naming of this file
(/var/yp/binding/domain/ypservers and /var/yp/binding/domain/vers)
and traditional NetBSD naming (/var/yp/binding/domain.vers).
Changing to the Solaris naming makes the C library incompatible
with ypbind.  While it's easy to change the C library, I don't feel
right about introducing a gratuitous incompatibility.

The current name (/var/yp/domain/ypservers) conflicts with the name
of the YP map listing slave servers for a domain.

Per discussion w/ Chris Demetriou and Luke Mewburn.
1996-10-02 05:55:05 +00:00
thorpej 2b63ba3bc9 .ypservers -> ypservers, to match Solaris 2.5 1996-10-01 01:37:58 +00:00
thorpej 2b1e73085e Add Luke Mewburn's support for a .ypservers file, which contains a list
of YP servers a client should bind to, mostly verbatim, but slightly
modified for better semantics when nagging servers if a ypset has been
issued.  Default to broadcast mode if no .ypservers file is present.

Documentation changes to match, slightly tweaked by Scott Reynolds and
myself.

Closes PR #1759.
1996-10-01 00:22:27 +00:00
ws 35a18894f5 xdr_bool wants a bool_t (which happens to be an int32_t on our port)
and not a char
1996-07-25 18:53:43 +00:00
thorpej 0d01b20301 Fix a misplaced #endif - if DEBUG wasn't defined, ypbind would never
detach from the controlling tty.
1996-07-09 06:34:12 +00:00
christos ebef85c991 Code cleanups.
- check malloc returns
- null terminate strncpy() strings
- use snprintf instead of sprintf
- pass the right arguments to the right functions
- check usage
- use err(3) and warn(3) instead of printfs.
1996-06-22 17:59:52 +00:00
thorpej 3e82f2c697 Fix typo that can cause ypbind to assume an error when one doesn't
actually exist if the server takes a dive.
1996-06-03 20:44:51 +00:00
thorpej 5bd844ce5d Fix buglet in ypbindproc_domain_2() which caused:
ypbind; sleep 10; ypwhich

to fail (where failure is defined as ypwhich hangs until it gives up,
complaining about not being able to communicate with ypbind).  Failure
mode pointed out by Chris G. Demetriou <cgd@cs.cmu.edu>.
1996-06-03 20:32:55 +00:00
thorpej eb46d3c03e Pull down yp/xdr fixes from release branch. 1996-05-29 20:11:10 +00:00
cgd efa731795e apply patch from PR 2085: don't treat XIDs and domain mapping pointers
interchangeably, because this is fragile and doesn't work at all on
the alpha.  (get rid of the old hack used on the alpha, and fix RCS
Ids, too.)
1996-03-30 22:49:08 +00:00
cgd ff276cbedc really nasty hack for the alpha. bigtime XXX 1995-04-21 04:40:36 +00:00
mycroft ae89e276d6 Daemonify only after the bind has been completed, and use daemon(). 1995-01-15 09:09:30 +00:00
mycroft d14504fe02 Closer to KNF, ANSI, and POSIX. 1995-01-15 08:55:59 +00:00
pk 064a6699f1 Recompute `width' before each select(), as the value of `svc_maxfd' can
be changed by the rpc library.
1995-01-06 13:16:15 +00:00
mycroft a9b844f65c Avoid getdtablesize(3). Also, remove some useless FD_CLR()s. 1994-12-30 04:49:06 +00:00
cgd 567049be09 be a bit more careful with types, and prototype scope. 1994-12-23 16:21:49 +00:00
deraadt 7d6a5f6936 create ypbind.lock file
fix ypset code
1994-09-28 01:39:54 +00:00
deraadt a63af7d439 force first binding poll automatically -- someone will need it very soon! 1994-09-20 07:21:46 +00:00
ws 9140a2f6e6 Keep a server even if we lost contact when noone else is available 1994-07-16 11:50:58 +00:00
deraadt 4cd934f8c4 changes from <ws@tools.de> to do selective pinging of servers. 1994-07-14 20:54:29 +00:00
deraadt 7473e6d9a3 from wolfgang, various further cleanup, and
mpliment the "clients are asking via RPC, therefore that might mean
the server is possibly dead" heuristic I bailed on earlier.
1994-07-02 06:45:48 +00:00
deraadt 26ca90bcec improved rebinding from ws@tools.de 1994-07-01 19:40:23 +00:00
deraadt b86d2fa05a correct copyright 1994-05-25 09:55:39 +00:00
deraadt 2b728f4750 sunos compatible /var/yp/binding/ files. 1993-12-03 10:08:12 +00:00
cgd 603b08d78b fix typo in last 1993-11-15 21:51:30 +00:00
deraadt 16f75ff463 ypset should only be permitted from a reserved port.
from Tor Egge <tegge@pvv.unit.no>
1993-11-15 08:20:05 +00:00
deraadt 79b9e39888 #endif in the wrong place 1993-09-05 16:10:01 +00:00
deraadt 77c037ed51 added my copyright.. how self efacing of me 1993-05-16 02:47:20 +00:00
deraadt e39dac2f56 initial rev 1993-04-26 08:09:02 +00:00