freebsd-skq/lib/libc/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
..
__error.c
_exit.2
abort2.2
accept.2 Add Xr to getsockname(2) 2008-06-20 14:47:06 +00:00
access.2 Man pages for the openat(2), fexecve(2) and related syscalls. 2008-04-16 13:03:12 +00:00
acct.2
adjtime.2
aio_cancel.2 style(9) cleanup 2008-04-03 02:41:54 +00:00
aio_error.2
aio_read.2
aio_return.2
aio_suspend.2 style(9) cleanup 2008-04-03 02:41:54 +00:00
aio_waitcomplete.2
aio_write.2
bind.2
brk.2
chdir.2
chflags.2
chmod.2 Man pages for the openat(2), fexecve(2) and related syscalls. 2008-04-16 13:03:12 +00:00
chown.2 Man pages for the openat(2), fexecve(2) and related syscalls. 2008-04-16 13:03:12 +00:00
chroot.2
clock_gettime.2 Add missing words. 2008-02-25 13:03:18 +00:00
close.2
connect.2
cpuset_getaffinity.2 Support for CPU sets is going to appear in 7.1 before 8.0. 2008-09-29 15:44:48 +00:00
cpuset.2 Support for CPU sets is going to appear in 7.1 before 8.0. 2008-09-29 15:44:48 +00:00
dup.2
execve.2 When calculating arguments to the interpreter for the shebang script 2008-08-26 10:53:32 +00:00
extattr_get_file.2 Update this manual page to describe the extattr_list_file() and the 2008-01-29 18:15:38 +00:00
fcntl.2 Add the new kernel-mode NFS Lock Manager. To use it instead of the 2008-03-26 15:23:12 +00:00
fcntl.c Call the fcntl compatiblity wrapper from the thread library fcntl wrappers 2008-05-30 14:47:42 +00:00
fhopen.2
flock.2 Xref flopen.3 which references this manual page. 2008-01-22 15:56:48 +00:00
fork.2
fsync.2
ftruncate.c
getdirentries.2
getdtablesize.2
getfh.2
getfsstat.2
getgid.2
getgroups.2
getitimer.2
getlogin.2
getpeername.2
getpgrp.2
getpid.2
getpriority.2
getrlimit.2 Integrate the new MPSAFE TTY layer to the FreeBSD operating system. 2008-08-20 08:31:58 +00:00
getrusage.2
getsid.2
getsockname.2
getsockopt.2 Bring missing getsockopt(2) options: SO_LABEL SO_PEERLABEL SO_LISTENQLIMIT 2008-06-12 22:58:35 +00:00
gettimeofday.2
getuid.2
intro.2
ioctl.2
issetugid.2
jail.2 Add EAGAIN to the ERRORS list, as found in kern_jail.c. 2008-08-03 21:56:58 +00:00
kenv.2
kill.2
kldfind.2
kldfirstmod.2
kldload.2
kldnext.2
kldstat.2
kldsym.2
kldunload.2 Fix bugs in previous revision (missing comma, misspelled syscall name). 2008-03-13 10:33:24 +00:00
kqueue.2
kse.2
ktrace.2 remove whitespace bug (8 spaces into one tab) 2008-08-02 13:49:12 +00:00
link.2 Man pages for the openat(2), fexecve(2) and related syscalls. 2008-04-16 13:03:12 +00:00
lio_listio.2
listen.2
lseek.2
lseek.c
madvise.2
Makefile.inc Integrate the new MPSAFE TTY layer to the FreeBSD operating system. 2008-08-20 08:31:58 +00:00
mincore.2 Add support to mincore for detecting whether a page is part of a 2008-03-28 04:29:27 +00:00
minherit.2 Bump manpage date, missed during the last change. 2007-10-30 15:28:43 +00:00
mkdir.2 - Forgot to bump a date after last change 2008-06-30 08:46:09 +00:00
mkfifo.2 Man pages for the openat(2), fexecve(2) and related syscalls. 2008-04-16 13:03:12 +00:00
mknod.2 Man pages for the openat(2), fexecve(2) and related syscalls. 2008-04-16 13:03:12 +00:00
mlock.2
mlockall.2
mmap.2 Finish what revision 1.40 started. Revision 1.40 removed a false statement 2008-10-24 14:40:13 +00:00
mmap.c
modfind.2
modnext.2
modstat.2 Update the definition of modspecific structure 2008-07-15 10:06:37 +00:00
mount.2
mprotect.2
mq_close.2 Use the easily-greppable copyright notice template from 2008-02-29 17:48:25 +00:00
mq_getattr.2 Use the easily-greppable copyright notice template from 2008-02-29 17:48:25 +00:00
mq_notify.2 Use the easily-greppable copyright notice template from 2008-02-29 17:48:25 +00:00
mq_open.2 Use the easily-greppable copyright notice template from 2008-02-29 17:48:25 +00:00
mq_receive.2 Use the easily-greppable copyright notice template from 2008-02-29 17:48:25 +00:00
mq_send.2 Use the easily-greppable copyright notice template from 2008-02-29 17:48:25 +00:00
mq_setattr.2 Use the easily-greppable copyright notice template from 2008-02-29 17:48:25 +00:00
msync.2
munmap.2
nanosleep.2
nfssvc.2
ntp_adjtime.2
open.2 Man pages for the openat(2), fexecve(2) and related syscalls. 2008-04-16 13:03:12 +00:00
pathconf.2
pipe.2
poll.2
posix_openpt.2 Integrate the new MPSAFE TTY layer to the FreeBSD operating system. 2008-08-20 08:31:58 +00:00
pread.c
profil.2
ptrace.2
pwrite.c
quotactl.2
read.2
readlink.2 Man pages for the openat(2), fexecve(2) and related syscalls. 2008-04-16 13:03:12 +00:00
reboot.2
recv.2
rename.2 Man pages for the openat(2), fexecve(2) and related syscalls. 2008-04-16 13:03:12 +00:00
revoke.2
rfork.2
rmdir.2
rtprio.2
sched_get_priority_max.2
sched_setparam.2
sched_setscheduler.2
sched_yield.2
sctp_generic_recvmsg.2 Correct minor typos in SCTP man pages. 2008-04-28 16:57:56 +00:00
sctp_generic_sendmsg.2 Remove extraneous empty lines, to fix mdoc warnings. 2007-10-30 15:36:40 +00:00
sctp_peeloff.2 Correct minor typos in SCTP man pages. 2008-04-28 16:57:56 +00:00
select.2 Add note about other systems. 2007-12-19 03:33:13 +00:00
semctl.2
semget.2
semop.2
send.2
sendfile.2 Give sendfile(2) a SF_SYNC flag which makes it wait until all mbufs 2008-02-03 15:54:41 +00:00
setfib.2 Add prototype defination for setfib(2) to sys/socket.h. 2008-08-08 22:40:04 +00:00
setgroups.2 Make it clearer that privilege is needed to reduce as well as 2008-06-16 14:50:21 +00:00
setpgid.2
setregid.2
setresuid.2
setreuid.2
setsid.2
setuid.2
shm_open.2 Add a new file descriptor type for IPC shared memory objects and use it to 2008-01-08 21:58:16 +00:00
shmat.2
shmctl.2
shmget.2
shutdown.2
sigaction.2
sigaltstack.2
sigpending.2
sigprocmask.2
sigqueue.2
sigreturn.2
sigstack.2
sigsuspend.2
sigwait.2
sigwaitinfo.2
socket.2 Add EPERM to the ERRORS section. 2008-08-04 22:22:17 +00:00
socketpair.2
stack_protector.c
stat.2 Man pages for the openat(2), fexecve(2) and related syscalls. 2008-04-16 13:03:12 +00:00
statfs.2
swapon.2
Symbol.map Implement support for RPCSEC_GSS authentication to both the NFS client 2008-11-03 10:38:00 +00:00
symlink.2 Man pages for the openat(2), fexecve(2) and related syscalls. 2008-04-16 13:03:12 +00:00
sync.2
sysarch.2
syscall.2
timer_create.2
timer_delete.2
timer_settime.2
truncate.2
truncate.c
umask.2
undelete.2
unlink.2 Man pages for the openat(2), fexecve(2) and related syscalls. 2008-04-16 13:03:12 +00:00
utimes.2 Man pages for the openat(2), fexecve(2) and related syscalls. 2008-04-16 13:03:12 +00:00
utrace.2
uuidgen.2
vfork.2
wait.2 Implement WNOWAIT flag for wait4(2). It specifies that process whose status 2008-08-26 12:37:16 +00:00
write.2