freebsd-dev/sys
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
..
amd64 Revert r184136. Instead, push the check for crashdumpmap overflow into the 2008-10-31 10:11:35 +00:00
arm Allow card reader bridge driver to report maximum supported transfer size. 2008-10-29 20:01:26 +00:00
boot Modify our boot block to pick an output device, without which boot1 will fail 2008-10-31 00:52:31 +00:00
bsm When MPSAFE ttys were merged, a new BSM audit event identifier was 2008-08-24 21:20:35 +00:00
cam Retire the MALLOC and FREE macros. They are an abomination unto style(9). 2008-10-23 15:53:51 +00:00
cddl Introduce accmode_t. This is required for NFSv4 ACLs - it will be neccessary 2008-10-28 13:44:11 +00:00
compat Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
conf Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
contrib Fix a number of style issues in the MALLOC / FREE commit. I've tried to 2008-10-23 20:26:15 +00:00
crypto Simplify session selection/allocation. 2008-08-09 20:01:01 +00:00
ddb Collect N identical (or near identical) mkdumpheader() implementations into 2008-10-01 22:08:53 +00:00
dev Turns out this isn't even used at all... The bogon that I was tracing was 2008-11-03 06:37:59 +00:00
fs Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
gdb Commit SYSINIT() ;-adding patch missed in previous pass. 2008-03-16 13:02:04 +00:00
geom Improve VFS locking: 2008-11-02 10:15:42 +00:00
gnu Improve VFS locking: 2008-11-02 10:15:42 +00:00
i386 Move the CAM passthrough code into a true module so that it doesn't have to be 2008-11-03 00:53:54 +00:00
ia64 Retire the MALLOC and FREE macros. They are an abomination unto style(9). 2008-10-23 15:53:51 +00:00
isa MFp4: 2008-11-02 18:48:54 +00:00
kern Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
kgssapi Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
libkern Prefix the static shl function with '__' like its parent function __qdivrem to 2008-10-09 20:43:42 +00:00
mips Remove cardbus attachment. It likely was a cut-n-paste left over from 2008-11-02 02:58:24 +00:00
modules Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
net Fix a number of style issues in the MALLOC / FREE commit. I've tried to 2008-10-23 20:26:15 +00:00
net80211 Fix checks for fast frames negotiation. ni_ath_flags holds the 2008-10-30 16:22:04 +00:00
netatalk Retire the MALLOC and FREE macros. They are an abomination unto style(9). 2008-10-23 15:53:51 +00:00
netgraph Fix a number of style issues in the MALLOC / FREE commit. I've tried to 2008-10-23 20:26:15 +00:00
netinet Type of q_time (start of queue idle time) has changed: uint32_t -> uint64_t. 2008-10-28 14:14:57 +00:00
netinet6 Add a MAC label, MAC Framework, and MAC policy entry points for IPv6 2008-10-26 22:45:18 +00:00
netipsec Retire the MALLOC and FREE macros. They are an abomination unto style(9). 2008-10-23 15:53:51 +00:00
netipx Retire the MALLOC and FREE macros. They are an abomination unto style(9). 2008-10-23 15:53:51 +00:00
netnatm Retire the MALLOC and FREE macros. They are an abomination unto style(9). 2008-10-23 15:53:51 +00:00
netncp Retire the MALLOC and FREE macros. They are an abomination unto style(9). 2008-10-23 15:53:51 +00:00
netsmb Catch up with netsmb locking: explicit thread arguments no longer required. 2008-11-02 23:20:27 +00:00
nfs Replaced the misleading uses of a historical artefact M_TRYWAIT with M_WAIT. 2008-03-25 09:39:02 +00:00
nfs4client Introduce accmode_t. This is required for NFSv4 ACLs - it will be neccessary 2008-10-28 13:44:11 +00:00
nfsclient Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
nfsserver Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
nlm Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
opencrypto Don't hang if encrypting/decrypting using struct iovecs where one of the 2008-10-30 16:11:07 +00:00
pc98 Improved IDE HDD geometry adjustment. Previous code didn't work with 2008-10-27 08:40:13 +00:00
pccard
pci Move mn over. One of the last stragglers in sys/pci. There's no 2008-11-02 17:04:54 +00:00
powerpc Fix compilation in the case when kernel doesn't have KDB ebabled. 2008-10-30 21:02:00 +00:00
rpc Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
security Update introductory comment for audit pipes. 2008-11-02 00:25:48 +00:00
sparc64 - Turn off interrupts instead of only entering a critical section 2008-10-28 22:05:20 +00:00
sun4v - In GCC 4.2 __builtin_frame_address() was fixed to include the 2008-10-27 21:31:14 +00:00
sys Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
tools Introduce a standalone shell script for embedding MFS image. 2008-02-05 10:46:30 +00:00
ufs Improve VFS locking: 2008-11-02 10:15:42 +00:00
vm Various comment nits, and typos. 2008-11-02 00:41:26 +00:00
xdr Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
xen Fix evtchn initialization on SMP 2008-10-24 07:57:48 +00:00
Makefile Improve the glimpse target: don't index .svn and compile directories. 2008-08-15 14:11:30 +00:00