FreeBSD src
Go to file
Doug Rabson a9148abd9d Implement support for RPCSEC_GSS authentication to both the NFS client
and server. This replaces the RPC implementation of the NFS client and
server with the newer RPC implementation originally developed
(actually ported from the userland sunrpc code) to support the NFS
Lock Manager.  I have tested this code extensively and I believe it is
stable and that performance is at least equal to the legacy RPC
implementation.

The NFS code currently contains support for both the new RPC
implementation and the older legacy implementation inherited from the
original NFS codebase. The default is to use the new implementation -
add the NFS_LEGACYRPC option to fall back to the old code. When I
merge this support back to RELENG_7, I will probably change this so
that users have to 'opt in' to get the new code.

To use RPCSEC_GSS on either client or server, you must build a kernel
which includes the KGSSAPI option and the crypto device. On the
userland side, you must build at least a new libc, mountd, mount_nfs
and gssd. You must install new versions of /etc/rc.d/gssd and
/etc/rc.d/nfsd and add 'gssd_enable=YES' to /etc/rc.conf.

As long as gssd is running, you should be able to mount an NFS
filesystem from a server that requires RPCSEC_GSS authentication. The
mount itself can happen without any kerberos credentials but all
access to the filesystem will be denied unless the accessing user has
a valid ticket file in the standard place (/tmp/krb5cc_<uid>). There
is currently no support for situations where the ticket file is in a
different place, such as when the user logged in via SSH and has
delegated credentials from that login. This restriction is also
present in Solaris and Linux. In theory, we could improve this in
future, possibly using Brooks Davis' implementation of variant
symlinks.

Supporting RPCSEC_GSS on a server is nearly as simple. You must create
service creds for the server in the form 'nfs/<fqdn>@<REALM>' and
install them in /etc/krb5.keytab. The standard heimdal utility ktutil
makes this fairly easy. After the service creds have been created, you
can add a '-sec=krb5' option to /etc/exports and restart both mountd
and nfsd.

The only other difference an administrator should notice is that nfsd
doesn't fork to create service threads any more. In normal operation,
there will be two nfsd processes, one in userland waiting for TCP
connections and one in the kernel handling requests. The latter
process will create as many kthreads as required - these should be
visible via 'top -H'. The code has some support for varying the number
of service threads according to load but initially at least, nfsd uses
a fixed number of threads according to the value supplied to its '-n'
option.

Sponsored by:	Isilon Systems
MFC after:	1 month
2008-11-03 10:38:00 +00:00
bin When running a "chio return" operation using a physical source unit 2008-10-30 19:51:02 +00:00
cddl Mips doesn't have a long double that's different in size from double. 2008-09-18 19:54:02 +00:00
contrib When encoding an smb name, truncate one byte earlier in order than we did 2008-11-02 19:48:15 +00:00
crypto At some point, construct_utmp() was changed to use realhostname() to fill 2008-10-21 11:58:26 +00:00
etc Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
games Another good day for historical quotes, Oliver Wendell Holmes brought to 2008-10-08 19:39:22 +00:00
gnu Document what the sed trick is for. 2008-10-16 18:09:27 +00:00
include Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
kerberos5 Add an implementation of the RPCSEC_GSS authentication protocol for RPC. This 2008-08-06 14:02:05 +00:00
lib Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
libexec This code has no copyright. It is fairly obvious to me that we're a 2008-10-13 20:24:03 +00:00
release Correct a typo in Nocona core name. 2008-10-23 10:38:04 +00:00
rescue Take a moment to tidy some white space while I'm here. No functional 2008-09-13 19:56:37 +00:00
sbin Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
secure Upgrade to OpenSSH 5.1p1. 2008-08-01 02:48:36 +00:00
share Document dev.rl.%unit.twister_enable sysctl/tunable. 2008-11-02 16:51:57 +00:00
sys Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
tools Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
usr.bin Use strlcpy() when we mean it. 2008-10-17 21:14:50 +00:00
usr.sbin Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
COPYRIGHT Happy new year 2008! 2007-12-31 22:09:19 +00:00
LOCKS Update LOCKS syntax. 2008-06-05 19:47:58 +00:00
MAINTAINERS Update description text 2008-06-06 21:32:01 +00:00
Makefile Back out rev. 1.352 (SVN rev 179842) as phk pointed out that 2008-06-17 11:08:49 +00:00
Makefile.inc1 Back out testing aid that was inadvertantly committed as part of r184205. 2008-10-23 16:06:49 +00:00
ObsoleteFiles.inc Several documentation fixups related to device minor/major numbers: 2008-09-28 20:15:45 +00:00
README Simply running ``make world'' will bomb unless you dig up the 2006-06-07 03:33:48 +00:00
UPDATING Type of q_time (start of queue idle time) has changed: uint32_t -> uint64_t. 2008-10-28 14:14:57 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The ``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html