Page MenuHomeFreeBSD

Allow nfsuserd(8) to optionally run in vnet prison
AbandonedPublic

Authored by rmacklem on Dec 27 2022, 12:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 9, 4:50 AM
Unknown Object (File)
Fri, Nov 7, 5:18 PM
Unknown Object (File)
Thu, Nov 6, 8:51 AM
Unknown Object (File)
Sat, Nov 1, 7:11 AM
Unknown Object (File)
Wed, Oct 29, 2:14 PM
Unknown Object (File)
Wed, Oct 29, 12:45 PM
Unknown Object (File)
Wed, Oct 29, 12:44 PM
Unknown Object (File)
Sat, Oct 25, 11:48 AM
Subscribers

Details

Reviewers
bz
jamie
asomers
Summary

D37519 allows mountd/nfsd to run in a vnet prison
when the kernel is built with the VNET_NFSD option
and "allow.nfsd" is specified in /etc/jail.conf.

This patch is intended to be applied on top of D37519
to allow nfsuserd(8) to run in the vnet prison along
with mountd/nfsd.

The only daemon not yet done is gssd(8) for Kerberized
NFS. I have coded that, but since I do not currently
have a KDC set up, it won't be tested for a while.

Test Plan

nfsuserd(8) was run both within and outside of an
appropriately configured vnet prison.
Trying to start nfsuserd(8) in a prison not configured
to run mountd/nfsd was also tested and it was
verified to fail to start up.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

nfsv4_loadattr() is called by the client as well as the
server. As such, it needs a NFSD_CURVNET_SET_QUIET()
and NFSD_CURVNET_RESTORE(), so that NFS clients
don't cause a crash.

These changes are now a part of D37519.