Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Nov 2008 16:23:24 +0000 (UTC)
From:      Doug Rabson <dfr@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r184813 - in user/dfr/gssapi/6/sys: . compat/freebsd32 conf fs/unionfs kern kgssapi modules/kgssapi modules/kgssapi_krb5 modules/krpc modules/nfsclient modules/nfsserver nfsclient nfsse...
Message-ID:  <200811101623.mAAGNORx074154@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dfr
Date: Mon Nov 10 16:23:24 2008
New Revision: 184813
URL: http://svn.freebsd.org/changeset/base/184813

Log:
  MFC: 183005,184588,184692,184693,184716,184719,184744

Added:
  user/dfr/gssapi/6/sys/kgssapi/
     - copied from r184588, head/sys/kgssapi/
  user/dfr/gssapi/6/sys/modules/kgssapi/
     - copied from r184588, head/sys/modules/kgssapi/
  user/dfr/gssapi/6/sys/modules/kgssapi_krb5/
     - copied from r184588, head/sys/modules/kgssapi_krb5/
  user/dfr/gssapi/6/sys/nfsclient/nfs_krpc.c
     - copied unchanged from r184588, head/sys/nfsclient/nfs_krpc.c
  user/dfr/gssapi/6/sys/nfsserver/nfs_fha.c
     - copied, changed from r184588, head/sys/nfsserver/nfs_fha.c
  user/dfr/gssapi/6/sys/nfsserver/nfs_fha.h
     - copied unchanged from r184588, head/sys/nfsserver/nfs_fha.h
  user/dfr/gssapi/6/sys/nfsserver/nfs_srvkrpc.c
     - copied unchanged from r184588, head/sys/nfsserver/nfs_srvkrpc.c
  user/dfr/gssapi/6/sys/rpc/replay.c
     - copied unchanged from r184588, head/sys/rpc/replay.c
  user/dfr/gssapi/6/sys/rpc/replay.h
     - copied unchanged from r184588, head/sys/rpc/replay.h
  user/dfr/gssapi/6/sys/rpc/rpcsec_gss/
     - copied from r184588, head/sys/rpc/rpcsec_gss/
  user/dfr/gssapi/6/sys/rpc/rpcsec_gss.h
     - copied unchanged from r184588, head/sys/rpc/rpcsec_gss.h
Modified:
  user/dfr/gssapi/6/sys/   (props changed)
  user/dfr/gssapi/6/sys/compat/freebsd32/syscalls.master
  user/dfr/gssapi/6/sys/conf/files
  user/dfr/gssapi/6/sys/conf/options
  user/dfr/gssapi/6/sys/fs/unionfs/union_vfsops.c
  user/dfr/gssapi/6/sys/kern/syscalls.master
  user/dfr/gssapi/6/sys/kern/vfs_export.c
  user/dfr/gssapi/6/sys/kern/vfs_mount.c
  user/dfr/gssapi/6/sys/modules/krpc/Makefile
  user/dfr/gssapi/6/sys/modules/nfsclient/Makefile
  user/dfr/gssapi/6/sys/modules/nfsserver/Makefile
  user/dfr/gssapi/6/sys/nfsclient/nfs.h
  user/dfr/gssapi/6/sys/nfsclient/nfs_socket.c
  user/dfr/gssapi/6/sys/nfsclient/nfs_subs.c
  user/dfr/gssapi/6/sys/nfsclient/nfs_vfsops.c
  user/dfr/gssapi/6/sys/nfsclient/nfsmount.h
  user/dfr/gssapi/6/sys/nfsserver/nfs.h
  user/dfr/gssapi/6/sys/nfsserver/nfs_serv.c
  user/dfr/gssapi/6/sys/nfsserver/nfs_srvcache.c
  user/dfr/gssapi/6/sys/nfsserver/nfs_srvsock.c
  user/dfr/gssapi/6/sys/nfsserver/nfs_srvsubs.c
  user/dfr/gssapi/6/sys/nfsserver/nfs_syscalls.c
  user/dfr/gssapi/6/sys/nfsserver/nfsm_subs.h
  user/dfr/gssapi/6/sys/nfsserver/nfsrvcache.h
  user/dfr/gssapi/6/sys/nlm/nlm.h
  user/dfr/gssapi/6/sys/nlm/nlm_advlock.c
  user/dfr/gssapi/6/sys/nlm/nlm_prot_impl.c
  user/dfr/gssapi/6/sys/nlm/nlm_prot_svc.c
  user/dfr/gssapi/6/sys/rpc/auth.h
  user/dfr/gssapi/6/sys/rpc/auth_none.c
  user/dfr/gssapi/6/sys/rpc/auth_unix.c
  user/dfr/gssapi/6/sys/rpc/clnt.h
  user/dfr/gssapi/6/sys/rpc/clnt_dg.c
  user/dfr/gssapi/6/sys/rpc/clnt_rc.c
  user/dfr/gssapi/6/sys/rpc/clnt_vc.c
  user/dfr/gssapi/6/sys/rpc/rpc_com.h
  user/dfr/gssapi/6/sys/rpc/rpc_generic.c
  user/dfr/gssapi/6/sys/rpc/rpc_msg.h
  user/dfr/gssapi/6/sys/rpc/rpc_prot.c
  user/dfr/gssapi/6/sys/rpc/svc.c
  user/dfr/gssapi/6/sys/rpc/svc.h
  user/dfr/gssapi/6/sys/rpc/svc_auth.c
  user/dfr/gssapi/6/sys/rpc/svc_auth.h
  user/dfr/gssapi/6/sys/rpc/svc_auth_unix.c
  user/dfr/gssapi/6/sys/rpc/svc_dg.c
  user/dfr/gssapi/6/sys/rpc/svc_generic.c
  user/dfr/gssapi/6/sys/rpc/svc_vc.c
  user/dfr/gssapi/6/sys/rpc/xdr.h
  user/dfr/gssapi/6/sys/sys/mount.h
  user/dfr/gssapi/6/sys/xdr/xdr_mbuf.c

Modified: user/dfr/gssapi/6/sys/compat/freebsd32/syscalls.master
==============================================================================
--- user/dfr/gssapi/6/sys/compat/freebsd32/syscalls.master	Mon Nov 10 13:23:15 2008	(r184812)
+++ user/dfr/gssapi/6/sys/compat/freebsd32/syscalls.master	Mon Nov 10 16:23:24 2008	(r184813)
@@ -764,3 +764,54 @@
 455	AUE_NULL	MSTD	{ int freebsd32_thr_new(	\
 				    struct thr_param32 *param,	\
 				    int param_size); }
+456	AUE_NULL	UNIMPL	sigqueue
+457	AUE_NULL	UNIMPL	kmq_open
+458	AUE_NULL	UNIMPL	kmq_setattr
+459	AUE_NULL	UNIMPL	kmq_timedreceive
+460	AUE_NULL	UNIMPL  kmq_timedsend
+461	AUE_NULL	UNIMPL	kmq_notify
+462	AUE_NULL	UNIMPL	kmq_unlink
+463	AUE_NULL	UNIMPL	abort2
+464	AUE_NULL 	UNIMPL	thr_set_name
+465	AUE_NULL	UNIMPL	aio_fsync
+466	AUE_NULL	UNIMPL	rtprio_thread
+467	AUE_NULL	UNIMPL	nosys
+468	AUE_NULL	UNIMPL	nosys
+469	AUE_NULL	UNIMPL	__getpath_fromfd
+470	AUE_NULL	UNIMPL	__getpath_fromaddr
+471	AUE_NULL	UNIMPL	sctp_peeloff
+472	AUE_NULL	UNIMPL	sctp_generic_sendmsg
+473	AUE_NULL	UNIMPL	sctp_generic_sendmsg_iov
+474	AUE_NULL	UNIMPL	sctp_generic_recvmsg
+475	AUE_NULL	UNIMPL	freebsd32_pread
+476	AUE_NULL	UNIMPL	freebsd32_pwrite
+477	AUE_NULL	UNIMPL 	freebsd32_mmap
+478	AUE_NULL	UNIMPL	freebsd32_lseek
+479	AUE_NULL	UNIMPL	freebsd32_truncate
+480	AUE_NULL	UNIMPL	freebsd32_ftruncate
+481	AUE_NULL	UNIMPL	thr_kill2
+482	AUE_NULL	UNIMPL	shm_open
+483	AUE_NULL	UNIMPL	shm_unlink
+484	AUE_NULL	UNIMPL	cpuset
+485	AUE_NULL	UNIMPL	freebsd32_cpuset_setid
+486	AUE_NULL	UNIMPL	freebsd32_cpuset_getid
+487	AUE_NULL	UNIMPL	freebsd32_cpuset_getaffinity
+488	AUE_NULL	UNIMPL	freebsd32_cpuset_setaffinity
+489	AUE_NULL	UNIMPL	faccessat
+490	AUE_NULL	UNIMPL	fchmodat
+491	AUE_NULL	UNIMPL	fchownat
+492	AUE_NULL	UNIMPL	freebsd32_fexecve
+493	AUE_NULL	UNIMPL	freebsd32_fstatat
+494	AUE_NULL	UNIMPL	freebsd32_futimesat
+495	AUE_NULL	UNIMPL	linkat
+496	AUE_NULL	UNIMPL	mkdirat
+497	AUE_NULL	UNIMPL	mkfifoat
+498	AUE_NULL	UNIMPL	mknodat
+499	AUE_NULL	UNIMPL	openat
+500	AUE_NULL	UNIMPL	readlinkat
+501	AUE_NULL	UNIMPL	renameat
+502	AUE_NULL	UNIMPL	symlinkat
+503	AUE_NULL	UNIMPL	unlinkat
+504	AUE_NULL	UNIMPL	posix_openpt
+; 505 is initialised by the kgssapi code, if present.
+505	AUE_NULL	UNIMPL	gssd_syscall

Modified: user/dfr/gssapi/6/sys/conf/files
==============================================================================
--- user/dfr/gssapi/6/sys/conf/files	Mon Nov 10 13:23:15 2008	(r184812)
+++ user/dfr/gssapi/6/sys/conf/files	Mon Nov 10 16:23:24 2008	(r184813)
@@ -305,7 +305,7 @@ crypto/des/des_ecb.c		optional netsmb
 crypto/des/des_setkey.c		optional crypto
 crypto/des/des_setkey.c		optional ipsec ipsec_esp
 crypto/des/des_setkey.c		optional netsmb
-crypto/rc4/rc4.c		optional netgraph_mppc_encryption
+crypto/rc4/rc4.c		optional netgraph_mppc_encryption | kgssapi
 crypto/rijndael/rijndael-alg-fst.c optional crypto
 crypto/rijndael/rijndael-alg-fst.c optional geom_bde
 crypto/rijndael/rijndael-alg-fst.c optional ipsec
@@ -1446,6 +1446,56 @@ kern/vfs_subr.c			standard
 kern/vfs_syscalls.c		standard
 kern/vfs_vnops.c		standard
 #
+# Kernel GSS-API
+#
+gssd.h				optional kgssapi			\
+	dependency		"$S/kgssapi/gssd.x"			\
+	compile-with		"rpcgen -hM $S/kgssapi/gssd.x | grep -v pthread.h > gssd.h" \
+	no-obj no-implicit-rule before-depend local			\
+	clean			"gssd.h"
+gssd_xdr.c			optional kgssapi			\
+	dependency		"$S/kgssapi/gssd.x gssd.h"		\
+	compile-with		"rpcgen -c $S/kgssapi/gssd.x -o gssd_xdr.c" \
+	no-implicit-rule before-depend local				\
+	clean			"gssd_xdr.c"
+gssd_clnt.c			optional kgssapi			\
+	dependency		"$S/kgssapi/gssd.x gssd.h"		\
+	compile-with		"rpcgen -lM $S/kgssapi/gssd.x | grep -v string.h > gssd_clnt.c" \
+	no-implicit-rule before-depend local				\
+	clean			"gssd_clnt.c"
+kgssapi/gss_accept_sec_context.c optional kgssapi
+kgssapi/gss_add_oid_set_member.c optional kgssapi
+kgssapi/gss_acquire_cred.c	optional kgssapi
+kgssapi/gss_canonicalize_name.c	optional kgssapi
+kgssapi/gss_create_empty_oid_set.c optional kgssapi
+kgssapi/gss_delete_sec_context.c optional kgssapi
+kgssapi/gss_display_status.c	optional kgssapi
+kgssapi/gss_export_name.c	optional kgssapi
+kgssapi/gss_get_mic.c		optional kgssapi
+kgssapi/gss_init_sec_context.c	optional kgssapi
+kgssapi/gss_impl.c		optional kgssapi
+kgssapi/gss_import_name.c	optional kgssapi
+kgssapi/gss_names.c		optional kgssapi
+kgssapi/gss_pname_to_uid.c	optional kgssapi
+kgssapi/gss_release_buffer.c	optional kgssapi
+kgssapi/gss_release_cred.c	optional kgssapi
+kgssapi/gss_release_name.c	optional kgssapi
+kgssapi/gss_release_oid_set.c	optional kgssapi
+kgssapi/gss_set_cred_option.c	optional kgssapi
+kgssapi/gss_test_oid_set_member.c optional kgssapi
+kgssapi/gss_unwrap.c		optional kgssapi
+kgssapi/gss_verify_mic.c	optional kgssapi
+kgssapi/gss_wrap.c		optional kgssapi
+kgssapi/gss_wrap_size_limit.c	optional kgssapi
+kgssapi/gssd_prot.c		optional kgssapi
+kgssapi/krb5/krb5_mech.c	optional kgssapi
+kgssapi/krb5/kcrypto.c		optional kgssapi
+kgssapi/krb5/kcrypto_aes.c	optional kgssapi
+kgssapi/krb5/kcrypto_arcfour.c	optional kgssapi
+kgssapi/krb5/kcrypto_des.c	optional kgssapi
+kgssapi/krb5/kcrypto_des3.c	optional kgssapi
+kgssapi/kgss_if.m		optional kgssapi
+kgssapi/gsstest.c		optional kgssapi_debug
 # These files in libkern/ are those needed by all architectures.  Some
 # of the files in libkern/ are only needed on some architectures, e.g.,
 # libkern/divdi3.c is needed by i386 but not alpha.  Also, some of these
@@ -1886,18 +1936,21 @@ nfsclient/krpc_subr.c		optional bootp nf
 nfsclient/nfs_bio.c		optional nfsclient
 nfsclient/nfs_diskless.c	optional nfsclient nfs_root
 nfsclient/nfs_node.c		optional nfsclient
-nfsclient/nfs_socket.c		optional nfsclient
+nfsclient/nfs_socket.c		optional nfsclient nfs_legacyrpc
+nfsclient/nfs_krpc.c		optional nfsclient
 nfsclient/nfs_subs.c		optional nfsclient
 nfsclient/nfs_nfsiod.c		optional nfsclient
 nfsclient/nfs_vfsops.c		optional nfsclient
 nfsclient/nfs_vnops.c		optional nfsclient
 nfsclient/nfs_lock.c		optional nfsclient
+nfsserver/nfs_fha.c		optional nfsserver
 nfsserver/nfs_serv.c		optional nfsserver
-nfsserver/nfs_srvsock.c		optional nfsserver
-nfsserver/nfs_srvcache.c	optional nfsserver
+nfsserver/nfs_srvkrpc.c		optional nfsserver
+nfsserver/nfs_srvsock.c		optional nfsserver nfs_legacyrpc
+nfsserver/nfs_srvcache.c	optional nfsserver nfs_legacyrpc
 nfsserver/nfs_srvsubs.c		optional nfsserver
-nfsserver/nfs_syscalls.c	optional nfsserver
-nlm/nlm_advlock.c		optional nfslockd
+nfsserver/nfs_syscalls.c	optional nfsserver nfs_legacyrpc
+nlm/nlm_advlock.c		optional nfslockd nfsclient
 nlm/nlm_prot_clnt.c		optional nfslockd
 nlm/nlm_prot_impl.c		optional nfslockd
 nlm/nlm_prot_server.c		optional nfslockd
@@ -1943,27 +1996,33 @@ pci/xrpu.c			optional xrpu pci
 posix4/ksched.c			optional _kposix_priority_scheduling
 posix4/p1003_1b.c		standard
 posix4/posix4_mib.c		standard
-rpc/auth_none.c			optional nfslockd
-rpc/auth_unix.c			optional nfslockd
-rpc/authunix_prot.c		optional nfslockd
-rpc/clnt_dg.c			optional nfslockd
-rpc/clnt_rc.c			optional nfslockd
-rpc/clnt_vc.c			optional nfslockd
-rpc/getnetconfig.c		optional nfslockd
-rpc/inet_ntop.c			optional nfslockd
-rpc/inet_pton.c			optional nfslockd
-rpc/rpc_callmsg.c		optional nfslockd
-rpc/rpc_generic.c		optional nfslockd
-rpc/rpc_prot.c			optional nfslockd
-rpc/rpcb_clnt.c			optional nfslockd
-rpc/rpcb_prot.c			optional nfslockd
+rpc/auth_none.c			optional krpc | nfslockd | nfsclient | nfsserver
+rpc/auth_unix.c			optional krpc | nfslockd | nfsclient
+rpc/authunix_prot.c		optional krpc | nfslockd | nfsclient | nfsserver
+rpc/clnt_dg.c			optional krpc | nfslockd | nfsclient
+rpc/clnt_rc.c			optional krpc | nfslockd | nfsclient
+rpc/clnt_vc.c			optional krpc | nfslockd | nfsclient | nfsserver
+rpc/getnetconfig.c		optional krpc | nfslockd | nfsclient | nfsserver
+rpc/inet_ntop.c			optional krpc | nfslockd | nfsclient | nfsserver
+rpc/inet_pton.c			optional krpc | nfslockd | nfsclient | nfsserver
+rpc/replay.c			optional krpc | nfslockd | nfsserver
+rpc/rpc_callmsg.c		optional krpc | nfslockd | nfsclient | nfsserver
+rpc/rpc_generic.c		optional krpc | nfslockd | nfsclient | nfsserver
+rpc/rpc_prot.c			optional krpc | nfslockd | nfsclient | nfsserver
+rpc/rpcb_clnt.c			optional krpc | nfslockd | nfsclient | nfsserver
+rpc/rpcb_prot.c			optional krpc | nfslockd | nfsclient | nfsserver
 rpc/rpcclnt.c			optional nfsclient
-rpc/svc.c			optional nfslockd
-rpc/svc_auth.c			optional nfslockd
-rpc/svc_auth_unix.c		optional nfslockd
-rpc/svc_dg.c			optional nfslockd
-rpc/svc_generic.c		optional nfslockd
-rpc/svc_vc.c			optional nfslockd
+rpc/svc.c			optional krpc | nfslockd | nfsserver
+rpc/svc_auth.c			optional krpc | nfslockd | nfsserver
+rpc/svc_auth_unix.c		optional krpc | nfslockd | nfsserver
+rpc/svc_dg.c			optional krpc | nfslockd | nfsserver
+rpc/svc_generic.c		optional krpc | nfslockd | nfsserver
+rpc/svc_vc.c			optional krpc | nfslockd | nfsserver
+rpc/rpcsec_gss/rpcsec_gss.c	optional krpc kgssapi | nfslockd kgssapi
+rpc/rpcsec_gss/rpcsec_gss_conf.c optional krpc kgssapi | nfslockd kgssapi
+rpc/rpcsec_gss/rpcsec_gss_misc.c optional krpc kgssapi | nfslockd kgssapi
+rpc/rpcsec_gss/rpcsec_gss_prot.c optional krpc kgssapi | nfslockd kgssapi
+rpc/rpcsec_gss/svc_rpcsec_gss.c	optional krpc kgssapi | nfslockd kgssapi
 security/audit/audit.c		optional audit
 security/audit/audit_arg.c	optional audit
 security/audit/audit_bsm.c	optional audit
@@ -2039,9 +2098,160 @@ vm/vm_pager.c			standard
 vm/vm_unix.c			standard
 vm/vm_zeroidle.c		standard
 vm/vnode_pager.c		standard
-xdr/xdr.c			optional nfslockd
-xdr/xdr_array.c			optional nfslockd
-xdr/xdr_mbuf.c			optional nfslockd
-xdr/xdr_mem.c			optional nfslockd
-xdr/xdr_reference.c		optional nfslockd
-xdr/xdr_sizeof.c		optional nfslockd
\ No newline at end of file
+xdr/xdr.c			optional krpc | nfslockd | nfsclient | nfsserver
+xdr/xdr_array.c			optional krpc | nfslockd | nfsclient | nfsserver
+xdr/xdr_mbuf.c			optional krpc | nfslockd | nfsclient | nfsserver
+xdr/xdr_mem.c			optional krpc | nfslockd | nfsclient | nfsserver
+xdr/xdr_reference.c		optional krpc | nfslockd | nfsclient | nfsserver
+xdr/xdr_sizeof.c		optional krpc | nfslockd | nfsclient | nfsserver
+#
+gnu/fs/xfs/xfs_alloc.c		optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" \
+	warning "kernel contains GPL contaminated xfs filesystem"
+gnu/fs/xfs/xfs_alloc_btree.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_bit.c		optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_bmap.c		optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_bmap_btree.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_btree.c		optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_buf_item.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_da_btree.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_dir.c		optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_dir2.c		optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_dir2_block.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_dir2_data.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_dir2_leaf.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_dir2_node.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_dir2_sf.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_dir2_trace.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_dir_leaf.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_error.c		optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_extfree_item.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_fsops.c		optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_ialloc.c		optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_ialloc_btree.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_inode.c		optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_inode_item.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_iocore.c		optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_itable.c		optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_dfrag.c		optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_log.c		optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_log_recover.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_mount.c		optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_rename.c		optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_trans.c		optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_trans_ail.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_trans_buf.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_trans_extfree.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_trans_inode.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_trans_item.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_utils.c		optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_vfsops.c		optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_vnodeops.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_rw.c		optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_attr_leaf.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_attr.c		optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_dmops.c		optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_qmops.c		optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_iget.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/FreeBSD/xfs_freebsd_iget.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/FreeBSD/xfs_mountops.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/FreeBSD/xfs_vnops.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/FreeBSD/xfs_frw.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/FreeBSD/xfs_buf.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/FreeBSD/xfs_globals.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/FreeBSD/xfs_dmistubs.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/FreeBSD/xfs_super.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/FreeBSD/xfs_stats.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/FreeBSD/xfs_vfs.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/FreeBSD/xfs_vnode.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/FreeBSD/xfs_sysctl.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/FreeBSD/xfs_fs_subr.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/FreeBSD/xfs_ioctl.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/FreeBSD/support/debug.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/FreeBSD/support/ktrace.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/FreeBSD/support/mrlock.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/FreeBSD/support/uuid.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/FreeBSD/support/kmem.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_iomap.c		optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+gnu/fs/xfs/xfs_behavior.c	optional xfs \
+	compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs"
+
+xen/gnttab.c                   optional xen
+xen/features.c                 optional xen
+xen/evtchn/evtchn.c            optional xen
+xen/evtchn/evtchn_dev.c                optional xen
+xen/xenbus/xenbus_client.c     optional xen
+xen/xenbus/xenbus_comms.c      optional xen
+xen/xenbus/xenbus_dev.c                optional xen
+xen/xenbus/xenbus_probe.c      optional xen
+xen/xenbus/xenbus_probe_backend.c      optional xen
+xen/xenbus/xenbus_xs.c         optional xen
+dev/xen/console/console.c      optional xen
+dev/xen/console/xencons_ring.c optional xen
+dev/xen/blkfront/blkfront.c    optional xen
+dev/xen/netfront/netfront.c    optional xen

Modified: user/dfr/gssapi/6/sys/conf/options
==============================================================================
--- user/dfr/gssapi/6/sys/conf/options	Mon Nov 10 13:23:15 2008	(r184812)
+++ user/dfr/gssapi/6/sys/conf/options	Mon Nov 10 16:23:24 2008	(r184813)
@@ -200,6 +200,10 @@ PSEUDOFS_TRACE	opt_pseudofs.h
 # Broken - ffs_snapshot() dependency from ufs_lookup() :-(
 FFS		opt_ffs_broken_fixme.h
 
+# In-kernel GSS-API
+KGSSAPI		opt_kgssapi.h
+KGSSAPI_DEBUG	opt_kgssapi.h
+
 # These static filesystems have one slightly bogus static dependency in
 # sys/i386/i386/autoconf.c.  If any of these filesystems are
 # statically compiled into the kernel, code for mounting them as root
@@ -207,6 +211,11 @@ FFS		opt_ffs_broken_fixme.h
 NFSCLIENT	opt_nfs.h
 NFSSERVER	opt_nfs.h
 
+# Use this option to compile both NFS client and server using the
+# legacy RPC implementation instead of the newer KRPC system (which
+# supports modern features such as RPCSEC_GSS
+NFS_LEGACYRPC	opt_nfs.h
+
 # filesystems and libiconv bridge
 CD9660_ICONV	opt_dontuse.h
 MSDOSFS_ICONV	opt_dontuse.h

Modified: user/dfr/gssapi/6/sys/fs/unionfs/union_vfsops.c
==============================================================================
--- user/dfr/gssapi/6/sys/fs/unionfs/union_vfsops.c	Mon Nov 10 13:23:15 2008	(r184812)
+++ user/dfr/gssapi/6/sys/fs/unionfs/union_vfsops.c	Mon Nov 10 16:23:24 2008	(r184813)
@@ -521,7 +521,7 @@ unionfs_fhtovp(struct mount *mp, struct 
 
 static int
 unionfs_checkexp(struct mount *mp, struct sockaddr *nam, int *extflagsp,
-		 struct ucred **credanonp)
+    struct ucred **credanonp, int *numsecflavors, int **secflavors)
 {
 	return (EOPNOTSUPP);
 }

Modified: user/dfr/gssapi/6/sys/kern/syscalls.master
==============================================================================
--- user/dfr/gssapi/6/sys/kern/syscalls.master	Mon Nov 10 13:23:15 2008	(r184812)
+++ user/dfr/gssapi/6/sys/kern/syscalls.master	Mon Nov 10 16:23:24 2008	(r184813)
@@ -807,5 +807,56 @@
 455	AUE_NULL	MSTD	{ int thr_new(struct thr_param *param, \
 				    int param_size); }
 
+456	AUE_NULL	UNIMPL	sigqueue
+457	AUE_NULL	UNIMPL	kmq_open
+458	AUE_NULL	UNIMPL	kmq_setattr
+459	AUE_NULL	UNIMPL	kmq_timedreceive
+460	AUE_NULL	UNIMPL  kmq_timedsend
+461	AUE_NULL	UNIMPL	kmq_notify
+462	AUE_NULL	UNIMPL	kmq_unlink
+463	AUE_NULL	UNIMPL	abort2
+464	AUE_NULL 	UNIMPL	thr_set_name
+465	AUE_NULL	UNIMPL	aio_fsync
+466	AUE_NULL	UNIMPL	rtprio_thread
+467	AUE_NULL	UNIMPL	nosys
+468	AUE_NULL	UNIMPL	nosys
+469	AUE_NULL	UNIMPL	__getpath_fromfd
+470	AUE_NULL	UNIMPL	__getpath_fromaddr
+471	AUE_NULL	UNIMPL	sctp_peeloff
+472	AUE_NULL	UNIMPL	sctp_generic_sendmsg
+473	AUE_NULL	UNIMPL	sctp_generic_sendmsg_iov
+474	AUE_NULL	UNIMPL	sctp_generic_recvmsg
+475	AUE_NULL	UNIMPL	pread
+476	AUE_NULL	UNIMPL	pwrite
+477	AUE_NULL	UNIMPL 	mmap
+478	AUE_NULL	UNIMPL	lseek
+479	AUE_NULL	UNIMPL	truncate
+480	AUE_NULL	UNIMPL	ftruncate
+481	AUE_NULL	UNIMPL	thr_kill2
+482	AUE_NULL	UNIMPL	shm_open
+483	AUE_NULL	UNIMPL	shm_unlink
+484	AUE_NULL	UNIMPL	cpuset
+485	AUE_NULL	UNIMPL	cpuset_setid
+486	AUE_NULL	UNIMPL	cpuset_getid
+487	AUE_NULL	UNIMPL	cpuset_getaffinity
+488	AUE_NULL	UNIMPL	cpuset_setaffinity
+489	AUE_NULL	UNIMPL	faccessat
+490	AUE_NULL	UNIMPL	fchmodat
+491	AUE_NULL	UNIMPL	fchownat
+492	AUE_NULL	UNIMPL	fexecve
+493	AUE_NULL	UNIMPL	fstatat
+494	AUE_NULL	UNIMPL	futimesat
+495	AUE_NULL	UNIMPL	linkat
+496	AUE_NULL	UNIMPL	mkdirat
+497	AUE_NULL	UNIMPL	mkfifoat
+498	AUE_NULL	UNIMPL	mknodat
+499	AUE_NULL	UNIMPL	openat
+500	AUE_NULL	UNIMPL	readlinkat
+501	AUE_NULL	UNIMPL	renameat
+502	AUE_NULL	UNIMPL	symlinkat
+503	AUE_NULL	UNIMPL	unlinkat
+504	AUE_NULL	UNIMPL	posix_openpt
+; 505 is initialised by the kgssapi code, if present.
+505	AUE_NULL	NOSTD	{ int gssd_syscall(char *path); }
 ; Please copy any additions and changes to the following compatability tables:
 ; sys/compat/freebsd32/syscalls.master

Modified: user/dfr/gssapi/6/sys/kern/vfs_export.c
==============================================================================
--- user/dfr/gssapi/6/sys/kern/vfs_export.c	Mon Nov 10 13:23:15 2008	(r184812)
+++ user/dfr/gssapi/6/sys/kern/vfs_export.c	Mon Nov 10 16:23:24 2008	(r184813)
@@ -68,6 +68,8 @@ struct netcred {
 	struct	radix_node netc_rnodes[2];
 	int	netc_exflags;
 	struct	ucred netc_anon;
+	int	netc_numsecflavors;
+	int	netc_secflavors[MAXSECFLAVORS];
 };
 
 /*
@@ -116,6 +118,9 @@ vfs_hang_addrlist(mp, nep, argp)
 		np->netc_anon.cr_ngroups = argp->ex_anon.cr_ngroups;
 		bcopy(argp->ex_anon.cr_groups, np->netc_anon.cr_groups,
 		    sizeof(np->netc_anon.cr_groups));
+		np->netc_numsecflavors = argp->ex_numsecflavors;
+		bcopy(argp->ex_secflavors, np->netc_secflavors,
+		    sizeof(np->netc_secflavors));
 		refcount_init(&np->netc_anon.cr_ref, 1);
 		MNT_ILOCK(mp);
 		mp->mnt_flag |= MNT_DEFEXPORTED;
@@ -177,6 +182,9 @@ vfs_hang_addrlist(mp, nep, argp)
 	np->netc_anon.cr_ngroups = argp->ex_anon.cr_ngroups;
 	bcopy(argp->ex_anon.cr_groups, np->netc_anon.cr_groups,
 	    sizeof(np->netc_anon.cr_groups));
+	np->netc_numsecflavors = argp->ex_numsecflavors;
+	bcopy(argp->ex_secflavors, np->netc_secflavors,
+	    sizeof(np->netc_secflavors));
 	refcount_init(&np->netc_anon.cr_ref, 1);
 	return (0);
 out:
@@ -232,6 +240,10 @@ vfs_export(mp, argp)
 	struct netexport *nep;
 	int error;
 
+	if (argp->ex_numsecflavors < 0
+	    || argp->ex_numsecflavors >= MAXSECFLAVORS)
+		return (EINVAL);
+
 	nep = mp->mnt_export;
 	if (argp->ex_flags & MNT_DELEXPORT) {
 		if (nep == NULL)
@@ -404,11 +416,8 @@ vfs_export_lookup(struct mount *mp, stru
  */
 
 int 
-vfs_stdcheckexp(mp, nam, extflagsp, credanonp)
-	struct mount *mp;
-	struct sockaddr *nam;
-	int *extflagsp;
-	struct ucred **credanonp;
+vfs_stdcheckexp(struct mount *mp, struct sockaddr *nam, int *extflagsp,
+    struct ucred **credanonp, int *numsecflavors, int **secflavors)
 {
 	struct netcred *np;
 
@@ -417,6 +426,10 @@ vfs_stdcheckexp(mp, nam, extflagsp, cred
 		return (EACCES);
 	*extflagsp = np->netc_exflags;
 	*credanonp = &np->netc_anon;
+	if (numsecflavors)
+		*numsecflavors = np->netc_numsecflavors;
+	if (secflavors)
+		*secflavors = np->netc_secflavors;
 	return (0);
 }
 

Modified: user/dfr/gssapi/6/sys/kern/vfs_mount.c
==============================================================================
--- user/dfr/gssapi/6/sys/kern/vfs_mount.c	Mon Nov 10 13:23:15 2008	(r184812)
+++ user/dfr/gssapi/6/sys/kern/vfs_mount.c	Mon Nov 10 16:23:24 2008	(r184813)
@@ -801,6 +801,7 @@ vfs_domount(
 	struct vnode *vp;
 	struct mount *mp;
 	struct vfsconf *vfsp;
+	struct oexport_args oexport;
 	struct export_args export;
 	int error, flag = 0;
 	struct vattr va;
@@ -977,6 +978,19 @@ vfs_domount(
 		if (vfs_copyopt(mp->mnt_optnew, "export", &export,
 		    sizeof(export)) == 0)
 			error = vfs_export(mp, &export);
+		else if (vfs_copyopt(mp->mnt_optnew, "export", &oexport,
+			sizeof(oexport)) == 0) {
+			export.ex_flags = oexport.ex_flags;
+			export.ex_root = oexport.ex_root;
+			export.ex_anon = oexport.ex_anon;
+			export.ex_addr = oexport.ex_addr;
+			export.ex_addrlen = oexport.ex_addrlen;
+			export.ex_mask = oexport.ex_mask;
+			export.ex_masklen = oexport.ex_masklen;
+			export.ex_indexfile = oexport.ex_indexfile;
+			export.ex_numsecflavors = 0;
+			error = vfs_export(mp, &export);
+		}
 	}
 
 	if (!error) {

Modified: user/dfr/gssapi/6/sys/modules/krpc/Makefile
==============================================================================
--- user/dfr/gssapi/6/sys/modules/krpc/Makefile	Mon Nov 10 13:23:15 2008	(r184812)
+++ user/dfr/gssapi/6/sys/modules/krpc/Makefile	Mon Nov 10 16:23:24 2008	(r184813)
@@ -16,6 +16,7 @@ SRCS=	auth_none.c \
 	rpc_prot.c \
 	rpcb_clnt.c \
 	rpcb_prot.c \
+	replay.c \
 	svc.c \
 	svc_auth.c \
 	svc_auth_unix.c \

Modified: user/dfr/gssapi/6/sys/modules/nfsclient/Makefile
==============================================================================
--- user/dfr/gssapi/6/sys/modules/nfsclient/Makefile	Mon Nov 10 13:23:15 2008	(r184812)
+++ user/dfr/gssapi/6/sys/modules/nfsclient/Makefile	Mon Nov 10 16:23:24 2008	(r184813)
@@ -6,11 +6,11 @@
 KMOD=	nfsclient
 SRCS=	vnode_if.h \
 	nfs_bio.c nfs_lock.c nfs_node.c nfs_socket.c nfs_subs.c nfs_nfsiod.c \
-	nfs_vfsops.c nfs_vnops.c nfs_common.c \
+	nfs_vfsops.c nfs_vnops.c nfs_common.c nfs_krpc.c \
 	opt_inet.h opt_nfs.h opt_bootp.h opt_nfsroot.h
 SRCS+=	nfs4_dev.c nfs4_idmap.c nfs4_socket.c nfs4_subs.c \
 	nfs4_vfs_subs.c  nfs4_vfsops.c nfs4_vn_subs.c nfs4_vnops.c
-SRCS+=	opt_inet6.h
+SRCS+=	opt_inet6.h opt_kgssapi.h
 
 # USE THE RPCCLNT:
 CFLAGS+= -DRPCCLNT_DEBUG

Modified: user/dfr/gssapi/6/sys/modules/nfsserver/Makefile
==============================================================================
--- user/dfr/gssapi/6/sys/modules/nfsserver/Makefile	Mon Nov 10 13:23:15 2008	(r184812)
+++ user/dfr/gssapi/6/sys/modules/nfsserver/Makefile	Mon Nov 10 16:23:24 2008	(r184813)
@@ -3,8 +3,8 @@
 .PATH: ${.CURDIR}/../../nfsserver ${.CURDIR}/../../nfs
 KMOD=	nfsserver
 SRCS=	vnode_if.h \
-	nfs_serv.c nfs_srvsock.c nfs_srvcache.c nfs_srvsubs.c nfs_syscalls.c \
-	nfs_common.c \
+	nfs_fha.c nfs_serv.c nfs_srvkrpc.c nfs_srvsock.c nfs_srvcache.c \
+	nfs_srvsubs.c nfs_syscalls.c nfs_common.c \
 	opt_mac.h \
 	opt_nfs.h
 SRCS+=	opt_inet6.h

Modified: user/dfr/gssapi/6/sys/nfsclient/nfs.h
==============================================================================
--- user/dfr/gssapi/6/sys/nfsclient/nfs.h	Mon Nov 10 13:23:15 2008	(r184812)
+++ user/dfr/gssapi/6/sys/nfsclient/nfs.h	Mon Nov 10 16:23:24 2008	(r184813)
@@ -131,7 +131,9 @@ MALLOC_DECLARE(M_NFSDIRECTIO);
 
 extern struct uma_zone *nfsmount_zone;
 
+#ifdef NFS_LEGACYRPC
 extern struct callout nfs_callout;
+#endif
 extern struct nfsstats nfsstats;
 
 extern int nfs_numasync;
@@ -160,6 +162,8 @@ struct nameidata;
 		 (e) != ERESTART && (e) != EWOULDBLOCK && \
 		((s) & PR_CONNREQUIRED) == 0)
 
+#ifdef NFS_LEGACYRPC
+
 /*
  * Nfs outstanding request list element
  */
@@ -197,6 +201,22 @@ extern TAILQ_HEAD(nfs_reqq, nfsreq) nfs_
 #define	R_MUSTRESEND	0x40		/* Must resend request */
 #define	R_GETONEREP	0x80		/* Probe for one reply only */
 
+#else
+
+/*
+ * This is only needed to keep things working while we support
+ * compiling for both RPC implementations.
+ */
+struct nfsreq;
+struct nfsmount;
+
+#endif
+
+struct buf;
+struct socket;
+struct uio;
+struct vattr;
+
 /*
  * Pointers to ops that differ from v3 to v4
  */
@@ -285,12 +305,18 @@ vfs_init_t nfs_init;
 vfs_uninit_t nfs_uninit;
 int	nfs_mountroot(struct mount *mp, struct thread *td);
 
+#ifdef NFS_LEGACYRPC
 #ifndef NFS4_USE_RPCCLNT
 int	nfs_send(struct socket *, struct sockaddr *, struct mbuf *,
 	    struct nfsreq *);
 int	nfs_sndlock(struct nfsreq *);
 void	nfs_sndunlock(struct nfsreq *);
+void	nfs_up(struct nfsreq *, struct nfsmount *, struct thread *,
+	    const char *, int);
+void	nfs_down(struct nfsreq *, struct nfsmount *, struct thread *,
+	    const char *, int, int);
 #endif /* ! NFS4_USE_RPCCLNT */
+#endif
 
 int	nfs_vinvalbuf(struct vnode *, int, struct thread *, int);
 int	nfs_readrpc(struct vnode *, struct uio *, struct ucred *);
@@ -302,11 +328,7 @@ int	nfs_readdirrpc(struct vnode *, struc
 int	nfs_nfsiodnew(void);
 int	nfs_asyncio(struct nfsmount *, struct buf *, struct ucred *, struct thread *);
 int	nfs_doio(struct vnode *, struct buf *, struct ucred *, struct thread *);
-void    nfs_doio_directwrite (struct buf *);
-void    nfs_up(struct nfsreq *, struct nfsmount *, struct thread *,
-	    const char *, int);
-void	nfs_down(struct nfsreq *, struct nfsmount *, struct thread *,
-	    const char *, int, int);
+void	nfs_doio_directwrite (struct buf *);
 int	nfs_readlinkrpc(struct vnode *, struct uio *, struct ucred *);
 int	nfs_sigintr(struct nfsmount *, struct nfsreq *, struct thread *);
 int	nfs_readdirplusrpc(struct vnode *, struct uio *, struct ucred *);

Copied: user/dfr/gssapi/6/sys/nfsclient/nfs_krpc.c (from r184588, head/sys/nfsclient/nfs_krpc.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/dfr/gssapi/6/sys/nfsclient/nfs_krpc.c	Mon Nov 10 16:23:24 2008	(r184813, copy of r184588, head/sys/nfsclient/nfs_krpc.c)
@@ -0,0 +1,769 @@
+/*-
+ * Copyright (c) 1989, 1991, 1993, 1995
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Rick Macklem at The University of Guelph.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)nfs_socket.c	8.5 (Berkeley) 3/30/95
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+/*
+ * Socket operations for use by nfs
+ */
+
+#include "opt_inet6.h"
+#include "opt_kgssapi.h"
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/limits.h>
+#include <sys/lock.h>
+#include <sys/malloc.h>
+#include <sys/mbuf.h>
+#include <sys/mount.h>
+#include <sys/mutex.h>
+#include <sys/proc.h>
+#include <sys/signalvar.h>
+#include <sys/syscallsubr.h>
+#include <sys/sysctl.h>
+#include <sys/syslog.h>
+#include <sys/vnode.h>
+
+#include <rpc/rpc.h>
+#include <rpc/rpcclnt.h>
+
+#include <nfs/rpcv2.h>
+#include <nfs/nfsproto.h>
+#include <nfsclient/nfs.h>
+#include <nfs/xdr_subs.h>
+#include <nfsclient/nfsm_subs.h>
+#include <nfsclient/nfsmount.h>
+#include <nfsclient/nfsnode.h>
+
+#include <nfs4client/nfs4.h>
+
+#ifndef NFS_LEGACYRPC
+
+static int	nfs_realign_test;
+static int	nfs_realign_count;
+static int	nfs_bufpackets = 4;
+static int	nfs_reconnects;
+static int	nfs3_jukebox_delay = 10;
+static int	nfs_skip_wcc_data_onerr = 1;
+static int	fake_wchan;
+
+SYSCTL_DECL(_vfs_nfs);
+
+SYSCTL_INT(_vfs_nfs, OID_AUTO, realign_test, CTLFLAG_RW, &nfs_realign_test, 0,
+    "Number of realign tests done");
+SYSCTL_INT(_vfs_nfs, OID_AUTO, realign_count, CTLFLAG_RW, &nfs_realign_count, 0,
+    "Number of mbuf realignments done");
+SYSCTL_INT(_vfs_nfs, OID_AUTO, bufpackets, CTLFLAG_RW, &nfs_bufpackets, 0,
+    "Buffer reservation size 2 < x < 64");
+SYSCTL_INT(_vfs_nfs, OID_AUTO, reconnects, CTLFLAG_RD, &nfs_reconnects, 0,
+    "Number of times the nfs client has had to reconnect");
+SYSCTL_INT(_vfs_nfs, OID_AUTO, nfs3_jukebox_delay, CTLFLAG_RW, &nfs3_jukebox_delay, 0,
+    "Number of seconds to delay a retry after receiving EJUKEBOX");
+SYSCTL_INT(_vfs_nfs, OID_AUTO, skip_wcc_data_onerr, CTLFLAG_RW, &nfs_skip_wcc_data_onerr, 0,
+    "Disable weak cache consistency checking when server returns an error");
+
+static void	nfs_down(struct nfsmount *, struct thread *, const char *,
+    int, int);
+static void	nfs_up(struct nfsmount *, struct thread *, const char *,
+    int, int);
+static int	nfs_msg(struct thread *, const char *, const char *, int);
+
+extern int nfsv2_procid[];
+
+struct nfs_cached_auth {
+	int		ca_refs; /* refcount, including 1 from the cache */
+	uid_t		ca_uid;	 /* uid that corresponds to this auth */
+	AUTH		*ca_auth; /* RPC auth handle */
+};
+
+/*
+ * RTT estimator
+ */
+
+static enum nfs_rto_timer_t nfs_proct[NFS_NPROCS] = {
+	NFS_DEFAULT_TIMER,	/* NULL */
+	NFS_GETATTR_TIMER,	/* GETATTR */
+	NFS_DEFAULT_TIMER,	/* SETATTR */
+	NFS_LOOKUP_TIMER,	/* LOOKUP */
+	NFS_GETATTR_TIMER,	/* ACCESS */
+	NFS_READ_TIMER,		/* READLINK */
+	NFS_READ_TIMER,		/* READ */
+	NFS_WRITE_TIMER,	/* WRITE */
+	NFS_DEFAULT_TIMER,	/* CREATE */
+	NFS_DEFAULT_TIMER,	/* MKDIR */
+	NFS_DEFAULT_TIMER,	/* SYMLINK */
+	NFS_DEFAULT_TIMER,	/* MKNOD */
+	NFS_DEFAULT_TIMER,	/* REMOVE */
+	NFS_DEFAULT_TIMER,	/* RMDIR */
+	NFS_DEFAULT_TIMER,	/* RENAME */
+	NFS_DEFAULT_TIMER,	/* LINK */
+	NFS_READ_TIMER,		/* READDIR */
+	NFS_READ_TIMER,		/* READDIRPLUS */
+	NFS_DEFAULT_TIMER,	/* FSSTAT */
+	NFS_DEFAULT_TIMER,	/* FSINFO */
+	NFS_DEFAULT_TIMER,	/* PATHCONF */
+	NFS_DEFAULT_TIMER,	/* COMMIT */
+	NFS_DEFAULT_TIMER,	/* NOOP */
+};
+
+/*
+ * Choose the correct RTT timer for this NFS procedure.
+ */
+static inline enum nfs_rto_timer_t
+nfs_rto_timer(u_int32_t procnum)
+{
+	return nfs_proct[procnum];
+}
+
+/*
+ * Initialize the RTT estimator state for a new mount point.
+ */
+static void
+nfs_init_rtt(struct nfsmount *nmp)
+{
+	int i;
+
+	for (i = 0; i < NFS_MAX_TIMER; i++) {
+		nmp->nm_timers[i].rt_srtt = hz;
+		nmp->nm_timers[i].rt_deviate = 0;
+		nmp->nm_timers[i].rt_rtxcur = hz;
+	}
+}
+
+/*
+ * Initialize sockets and congestion for a new NFS connection.
+ * We do not free the sockaddr if error.
+ */
+int
+nfs_connect(struct nfsmount *nmp, struct nfsreq *rep)
+{
+	int rcvreserve, sndreserve;
+	int pktscale;
+	struct sockaddr *saddr;
+	struct ucred *origcred;
+	struct thread *td = curthread;
+	CLIENT *client;
+	struct netconfig *nconf;
+	rpcvers_t vers;
+	int one = 1, retries;
+
+	/*
+	 * We need to establish the socket using the credentials of
+	 * the mountpoint.  Some parts of this process (such as
+	 * sobind() and soconnect()) will use the curent thread's
+	 * credential instead of the socket credential.  To work
+	 * around this, temporarily change the current thread's
+	 * credential to that of the mountpoint.
+	 *
+	 * XXX: It would be better to explicitly pass the correct
+	 * credential to sobind() and soconnect().
+	 */
+	origcred = td->td_ucred;
+	td->td_ucred = nmp->nm_mountp->mnt_cred;
+	saddr = nmp->nm_nam;
+
+	vers = NFS_VER2;
+	if (nmp->nm_flag & NFSMNT_NFSV3)
+		vers = NFS_VER3;
+	else if (nmp->nm_flag & NFSMNT_NFSV4)
+		vers = NFS_VER4;
+	if (saddr->sa_family == AF_INET)
+		if (nmp->nm_sotype == SOCK_DGRAM)
+			nconf = getnetconfigent("udp");
+		else
+			nconf = getnetconfigent("tcp");
+	else
+		if (nmp->nm_sotype == SOCK_DGRAM)
+			nconf = getnetconfigent("udp6");
+		else
+			nconf = getnetconfigent("tcp6");
+			
+	/*
+	 * Get buffer reservation size from sysctl, but impose reasonable
+	 * limits.
+	 */
+	pktscale = nfs_bufpackets;
+	if (pktscale < 2)
+		pktscale = 2;
+	if (pktscale > 64)
+		pktscale = 64;
+	mtx_lock(&nmp->nm_mtx);
+	if (nmp->nm_sotype == SOCK_DGRAM) {
+		sndreserve = (nmp->nm_wsize + NFS_MAXPKTHDR) * pktscale;
+		rcvreserve = (max(nmp->nm_rsize, nmp->nm_readdirsize) +
+		    NFS_MAXPKTHDR) * pktscale;
+	} else if (nmp->nm_sotype == SOCK_SEQPACKET) {
+		sndreserve = (nmp->nm_wsize + NFS_MAXPKTHDR) * pktscale;
+		rcvreserve = (max(nmp->nm_rsize, nmp->nm_readdirsize) +
+		    NFS_MAXPKTHDR) * pktscale;
+	} else {
+		if (nmp->nm_sotype != SOCK_STREAM)
+			panic("nfscon sotype");
+		sndreserve = (nmp->nm_wsize + NFS_MAXPKTHDR +
+		    sizeof (u_int32_t)) * pktscale;
+		rcvreserve = (nmp->nm_rsize + NFS_MAXPKTHDR +
+		    sizeof (u_int32_t)) * pktscale;
+	}
+	mtx_unlock(&nmp->nm_mtx);
+
+	client = clnt_reconnect_create(nconf, saddr, NFS_PROG, vers,
+	    sndreserve, rcvreserve);
+	CLNT_CONTROL(client, CLSET_WAITCHAN, "nfsreq");
+	if (nmp->nm_flag & NFSMNT_INT)
+		CLNT_CONTROL(client, CLSET_INTERRUPTIBLE, &one);
+	if (nmp->nm_flag & NFSMNT_RESVPORT)
+		CLNT_CONTROL(client, CLSET_PRIVPORT, &one);
+	if (nmp->nm_flag & NFSMNT_SOFT)
+		retries = nmp->nm_retry;
+	else
+		retries = INT_MAX;
+	CLNT_CONTROL(client, CLSET_RETRIES, &retries);
+
+	mtx_lock(&nmp->nm_mtx);
+	if (nmp->nm_client) {
+		/*
+		 * Someone else already connected.
+		 */
+		CLNT_RELEASE(client);
+	} else {
+		nmp->nm_client = client;
+	}
+
+	/*
+	 * Protocols that do not require connections may be optionally left
+	 * unconnected for servers that reply from a port other than NFS_PORT.
+	 */
+	if (!(nmp->nm_flag & NFSMNT_NOCONN)) {
+		mtx_unlock(&nmp->nm_mtx);
+		CLNT_CONTROL(client, CLSET_CONNECT, &one);
+	} else {
+		mtx_unlock(&nmp->nm_mtx);
+	}
+
+	/* Restore current thread's credentials. */
+	td->td_ucred = origcred;
+
+	mtx_lock(&nmp->nm_mtx);
+	/* Initialize other non-zero congestion variables */
+	nfs_init_rtt(nmp);
+	mtx_unlock(&nmp->nm_mtx);
+	return (0);
+}
+
+/*
+ * NFS disconnect. Clean up and unlink.
+ */
+void
+nfs_disconnect(struct nfsmount *nmp)
+{
+	CLIENT *client;
+
+	mtx_lock(&nmp->nm_mtx);
+	if (nmp->nm_client) {
+		client = nmp->nm_client;
+		nmp->nm_client = NULL;
+		mtx_unlock(&nmp->nm_mtx);
+#ifdef KGSSAPI
+		rpc_gss_secpurge(client);
+#endif
+		CLNT_CLOSE(client);
+		CLNT_RELEASE(client);
+	} else {
+		mtx_unlock(&nmp->nm_mtx);
+	}
+}
+
+void
+nfs_safedisconnect(struct nfsmount *nmp)
+{
+
+	nfs_disconnect(nmp);
+}
+

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811101623.mAAGNORx074154>