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)
Mon, May 19, 3:20 PM
Unknown Object (File)
Apr 24 2025, 12:36 PM
Unknown Object (File)
Apr 22 2025, 2:58 AM
Unknown Object (File)
Apr 21 2025, 11:24 AM
Unknown Object (File)
Apr 20 2025, 11:25 PM
Unknown Object (File)
Apr 14 2025, 7:31 AM
Unknown Object (File)
Apr 12 2025, 9:25 PM
Unknown Object (File)
Mar 28 2025, 7:53 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.