Commit Graph

6 Commits

Author SHA1 Message Date
Adam David 6dc00a94a6 sense of 'mask' was reversed in default case of no securenets file. 1996-02-29 18:29:24 +00:00
Bill Paul 9573c1f163 Add support for NIS v1 client procedures. The following procedures
are currently implemented:

YPOLDPROC_NULL
YPOLDPROC_DOMAIN
YPOLDPROC_DOMAIN_NONACK
YPOLDPROC_FIRST
YPOLDPROC_NEXT
YPOLDPROC_MATCH
YPOLDPROC_POLL

These are all implemented as wrappers around their v2 counterparts.

The YPOLDPROC_PUSH, PULL and GET procedures are not implemented since
a) I couldn't figure out exactly what to have them do, and b) I
suspect they're used for doing map transfers between master and
slave servers, which we already do using the v2 protocol anyway.
This means we can server NIS v1 clients but can't be a master or
slave with NIS v1-only servers. I think I'll get over it. :)

The -k (sunos_4_kludge) flag and associated code has been removed
since it is no longer needed.

Also tweaked yp_access() to handle both sets of procedures and
updated the man page.
1996-02-26 02:34:27 +00:00
Bill Paul 66c201eaba Duh: remember to #include <stdlib.h> to pick up declarations for
malloc() and free().
1996-02-25 19:25:23 +00:00
Bill Paul f7f470a811 Add real securenets support. By default, ypserv now uses /var/yp/securenets
in the same was as the SunOS ypserv (same format, described in ypserv man
page). If the user wants tcpwrapper style access control, they can
recompile ypserv to use that instead. This way we get securenets without
having to ship libwrap.a and tcpd.h with core FreeBSD distribution.

If /var/yp/securenets doesn't exist, ypserv allows all connections.
1996-02-24 22:01:48 +00:00
Bill Paul 009790d136 More changes brought about by testing of yppush (which is almost finished):
In yp_server.c:

- Modify ypproc_xfr_2_svc() so that it sends both a return status and
  a yppush callback (if necessary: normally ypxfr is supposed to send the
  callback once it's done transfering a map, but if we can't get ypxfr
  off the ground for some reason, we have to send it here instead) and
  do it in the right order: have to send the reply to the ypproc_xfr
  request first, then send callback. This requires us to cheat a bit:
  you're supposed to just return() and let the RPC dispatcher send
  the reply for you, but we wouldn't be able to send the callback message
  if we did that, so we have to call svc_sendreply() ourselves, then
  send the callback, and then return NULL so that the RPC dispatcher
  won't call svc_sendreply() itself.

- Also modify ypproc_xfr_2_svc() so that it doesn't invoke ypxfr with
  the -f flag: this overrides the order number checks, which prevents
  us from ever refusing maps that aren't newer than then ones we already
  have.

In yp_access.c:

- Fix a typo in the TCP_WRAPPER support code (which is #ifdef'ed out
  by default): a close paren somehow vanished into the ether.
1996-01-10 16:07:39 +00:00
Bill Paul 778c7b1c1c Import the new, non-GPL ypserv, written by yours truly. Functionally
equivalent to the old ypserv, except that it doesn't support the
-p [port] option to force the server to use a particular port.

The server stubs and yp.h header file are auto-generated from the yp.x
protocol definition file. The auto-generated XDR routines in libc/yp
are also used. The database access code has been broken out into a
seperate module so that other NIS utilities (ypxfr in particular)
can use it.

Note that the old mknetid script is being temporarily moved here; it
will be replaced by an mknetid program which will eventually have
a home under /usr/src/libexec. (The existing script is actually
somewhat broken -- it doesn't handle hosts -- but this isn't a big
deal at this point since the netid.byname map is really only useful
fopr Secure RPC, which we don't have yet.)
1995-12-16 20:54:17 +00:00