freebsd-dev/etc/rc.d
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
..
abi As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
accounting
addswap As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
adjkerntz As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
amd Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
apm As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
apmd Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
archdep As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
atm1 As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
atm2 As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
atm3 As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
auditd As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
auto_linklocal As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
bgfsck As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
bluetooth With uart(4) default, change /dev/cuad# to /dev/cuau# and 2008-07-19 20:11:33 +00:00
bootparams
bridge As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
bsnmpd Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
bthidd Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
ccd
cleanvar As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
cleartmp Align the script more with rc.d/cleanvar (which doesn't output any 2008-06-23 04:42:58 +00:00
cron
DAEMON
ddb As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
defaultroute As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
devd Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
devfs As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
dhclient
dmesg
dumpon As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
early.sh As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
encswap As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
FILESYSTEMS As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
fsck Move a lot of diagnostic output behind $rc_quiet in scripts that 2008-06-23 04:46:54 +00:00
ftp-proxy Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
ftpd Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
gbde As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
geli As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
geli2 As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
gssd Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
hcsecd Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
hostapd As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
hostid As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
hostname As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
idmapd Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
inetd
initrandom As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
ip6addrctl As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
ip6fw As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
ipfilter
ipfs
ipfw As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
ipmon
ipnat
ipsec
ipxrouted As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
jail Allow a jail's IP alias to be created with an arbitrary netmask. 2008-09-24 15:18:27 +00:00
kadmind As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
kerberos As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
keyserv Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
kldxref As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
kpasswdd As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
ldconfig Move a lot of diagnostic output behind $rc_quiet in scripts that 2008-06-23 04:46:54 +00:00
local Output information only if /etc/rc.local exists. 2008-06-22 16:23:39 +00:00
localpkg As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
lockd Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
LOGIN
lpd Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
Makefile Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
mdconfig As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
mdconfig2 As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
mixer As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
motd Move a lot of diagnostic output behind $rc_quiet in scripts that 2008-06-23 04:46:54 +00:00
mountcritlocal There's no need to announce that we're mounting local filesystems when 2008-07-05 15:19:58 +00:00
mountcritremote Don't say we're going to mount filesystems of a certain type unless 2008-06-22 15:40:19 +00:00
mountd Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
mountlate As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
moused Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
mroute6d As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
mrouted
msgs As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
named When using SRV records the protocols and services files need to be in the 2008-08-01 06:11:33 +00:00
natd As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
netif ifconfig(8) can take only one interface at a time. 2008-10-30 20:24:25 +00:00
netoptions As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
network_ipv6 As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
NETWORKING As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
newsyslog Move a lot of diagnostic output behind $rc_quiet in scripts that 2008-06-23 04:46:54 +00:00
nfsclient As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
nfsd Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
nfsserver As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
nisdomain As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
nscd Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
nsswitch As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
ntpd Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
ntpdate
othermta As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
pf As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
pflog As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
pfsync As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
power_profile As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
powerd Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
ppp As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
pppoed As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
pwcheck
quota Make quota knob conform to other rc(8) knobs. Keep older knob for 2008-06-19 07:06:11 +00:00
random As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
rarpd
resolv As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
rfcomm_pppd_server As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
root
route6d
routed
routing As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
rpcbind Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
rtadvd Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
rwho Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
savecore Add the ability to run /usr/sbin/crashinfo on a new core dump automatically 2008-08-29 20:30:30 +00:00
sdpd Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
securelevel
sendmail Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
serial With uart(4) default, change /dev/cuad# to /dev/cuau# and 2008-07-19 20:12:02 +00:00
SERVERS
sppp As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
sshd Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
statd Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
swap1 Add a -q flag to swapon(8) to suppress informational messages. Use it in 2008-06-23 22:17:08 +00:00
syscons As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
sysctl Oops, restore the recent changes to make startup messages quieter. 2008-07-31 22:13:14 +00:00
syslogd
timed Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
tmp As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
ugidfw Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
var As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
virecover
watchdogd Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
wpa_supplicant As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00
ypbind Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
yppasswdd Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
ypserv Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
ypset Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
ypupdated Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
ypxfrd Add the shutdown KEYWORD to those scripts that start persistent services 2008-07-16 19:50:29 +00:00
zfs As previously discussed, add the svn:executable property to all scripts 2008-07-16 19:22:48 +00:00