]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
nfsd: Enable the NFSD_VNET vnet front end macros
authorRick Macklem <rmacklem@FreeBSD.org>
Sat, 18 Feb 2023 22:59:36 +0000 (14:59 -0800)
committerRick Macklem <rmacklem@FreeBSD.org>
Thu, 18 May 2023 22:59:27 +0000 (15:59 -0700)
commit56b45bf5f6e14f9a46ee896543ad24070f11cc9c
tree33baf6ec0dab861ce7f5ebf7b8c884d62522374e
parent668c406ce567fb786a693153c2d8b25bfb217415
nfsd: Enable the NFSD_VNET vnet front end macros

Several commits have added front end macros for the vnet
macros to the NFS server, krpc and kgssapi.  These macros
are now null, but this patch changes them to front end
the vnet macros.

With this commit, many global variables in the code become
vnet'd, so that nfsd(8), nfsuserd(8), rpc.tlsservd(8) and
gssd(8) can run in a vnet prison, once enabled.
To run the NFS server in a vnet prison still requires a
couple of patches (in D37741 and D38371) that allow mountd(8)
to export file systems from within a vnet prison.  Once
these are committed to main, a small patch to kern_jail.c
allowing "allow.nfsd" without VNET_NFSD defined will allow
the NFS server to run in a vnet prison.

One area that still needs to be settled is cleanup when a
prison is removed.  Without this, everything should work
except there will be a leak of malloc'd data and mutex locks
when a vnet prison is removed.

(cherry picked from commit ed03776ca7f43de8275da80cfa89a9ecc4732f82)
sys/fs/nfs/nfs_commonport.c
sys/fs/nfs/nfsport.h
sys/fs/nfsserver/nfs_fha_new.c
sys/fs/nfsserver/nfs_nfsdport.c
sys/kgssapi/gssapi_impl.h
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
sys/rpc/rpcsec_tls.h