Commit Graph

13 Commits

Author SHA1 Message Date
Bill Paul
1e890b056a Just when you thought it was safe...
- getnetgrent.c: address some NIS compatibility problems. We really need
to use the netgroup.byuser and netgroup.byhost maps to speed up innetgr()
when using NIS. Also, change the NIS interaction in the following way:

If /etc/netgroup does not exist or is empty (or contains only the
NIS '+' token), we now use NIS exclusively. This lets us use the
'reverse netgroup' maps and is more or less the behavior of other
platforms.

If /etc/netgroup exists and contains local netgroup data (but no '+').
we use only lthe local stuff and ignore NIS.

If /etc/netgroup exists and contains both local data and the '+',
we use the local data nd the netgroup map as a single combined
database (which, unfortunately, can be slow when the netgroup
database is large). This is what we have been doing up until now.

Head off a potential NULL pointer dereference in the old innetgr()
matching code.

Also fix the way the NIS netgroup map is incorporated into things:
adding the '+' is supposed to make it seem as though the netgroup
database is 'inserted' wherever the '+' is placed. We didn't quite
do it that way before.

(The NetBSD people apparently use a real, honest-to-gosh, netgroup.db
database that works just like the password database. This is
actually a neat idea since netgroups is the sort of thing that
can really benefit from having multi-key search capability,
particularly since reverse lookups require more than a trivial
amount of processing. Should we do something like this too?)

- netgroup.5: document all this stuff.

- rcmd.c: some sleuthing with some test programs linked with my own
version of innetgr() has revealed that SunOS always passes the NIS
domain name to innetgr() in the 'domain' argument. We might as well
do the same (if YP is defined).

- ether_addr.c: also fix the NIS interaction so that placing the
'+' token in the /etc/ethers file makes it seem like the NIS
ethers data is 'inserted' at that point. (Chances are nobody will
notice the effect of this change, which is just te way I like it. :)
1995-08-07 03:42:14 +00:00
Doug Rabson
a62dc40654 Changes to support version 3 of the NFS protocol.
The version 2 support has been tested (client+server) against FreeBSD-2.0,
IRIX 5.3 and FreeBSD-current (using a loopback mount).  The version 2 support
is stable AFAIK.
The version 3 support has been tested with a loopback mount and minimally
against an IRIX 5.3 server.  It needs more testing and may have problems.
I have patched amd to support the new variable length filehandles although
it will still only use version 2 of the protocol.

Before booting a kernel with these changes, nfs clients will need to at least
build and install /usr/sbin/mount_nfs.  Servers will need to build and
install /usr/sbin/mountd.

NFS diskless support is untested.

Obtained from: Rick Macklem <rick@snowhite.cis.uoguelph.ca>
1995-06-27 11:07:30 +00:00
Rodney W. Grimes
d3628763db Merge RELENG_2_0_5 into HEAD 1995-06-11 19:33:05 +00:00
Rodney W. Grimes
5ebc7e6281 Remove trailing whitespace. 1995-05-30 06:12:45 +00:00
Poul-Henning Kamp
6444ef3b82 Add a undocumented '-d' flag to set debugging. 1995-05-21 19:31:09 +00:00
Bill Paul
8b5a6d67db Fixed stupid bug in mountd: it would seem that the kernel doesn't allow
you to push the same host into its NFS export lists twice, but mountd
tries to do it anyway. This means that putting:

/some_file_system -ro host1 host1

in your /etc/exports file causes an error. This is bogus: mountd should be
smart enough to ignore the second instance of host1. This can be a problem
in some configurations that use netgroups. For example, each host in my
netgroups database is has two entries:

startide (startide,-,) (startide.ctr.columbia.edu,-,)

When mountd sees this, it tries to put startide.ctr.columbia.edu into the
export list *twice*. Just listing 'startide' /etc/exports list will also
screw up because mountd will try to resolve the netgroup 'startide' instead
of the hostname 'startide.'

My solution is watch for duplicate entries in get_host() and mark them
as grouptype GT_IGNORE, which do_mount() will now cheefully throw away.
This is a bit of a kludge, but it was the least obtrusive fix I could
come up with.

Also silenced a compiler warning: arguments passwd to xdr_long() should
be u_long, not int. :)
1995-03-26 23:36:38 +00:00
Andreas Schulz
08b48e644c Document the mountdtab file in the man page. 1995-02-22 21:42:48 +00:00
Garrett Wollman
3980ac4f63 Change obnoxious ``Not root dir'' error message into one which actually
tells you what's wrong.
1994-12-02 02:58:56 +00:00
Garrett Wollman
d599144d24 Automatically load NFS and a bevy of other filesystems. 1994-09-22 22:17:02 +00:00
Doug Rabson
541758b1c6 Added support for MSDOS file systems. 1994-09-19 18:47:12 +00:00
Garrett Wollman
76c72a54c2 Delete obsolete references to librpc.a. 1994-08-08 00:09:22 +00:00
Garrett Wollman
404c1a5fc1 Convert to our man installation style. Also fixed long-standing bug
in `fastboot'/`fasthalt' in which the interpreter would hang around
after `reboot' or `halt' is run, causing an irritating ``Killed'' message.
1994-08-05 02:42:42 +00:00
Rodney W. Grimes
8fae3551ec BSD 4.4 Lite sbin Sources
Note:  XNSrouted and routed NOT imported here, they shall be imported with
usr.sbin.
1994-05-26 06:35:07 +00:00