Page MenuHomeFreeBSD

Add a -R option to mountd so that it can be run without rpcbind for an NFSv4 only server
ClosedPublic

Authored by rmacklem on Oct 12 2020, 2:15 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 6, 11:08 AM
Unknown Object (File)
Sep 8 2025, 7:40 PM
Unknown Object (File)
Sep 8 2025, 4:19 PM
Unknown Object (File)
Sep 1 2025, 12:53 AM
Unknown Object (File)
Aug 26 2025, 8:24 PM
Unknown Object (File)
Aug 12 2025, 4:00 AM
Unknown Object (File)
Aug 2 2025, 1:31 AM
Unknown Object (File)
Jul 14 2025, 5:19 AM
Subscribers

Details

Summary

rpcbind is now considered a security risk for some sites.
Since an NFSv4 only NFS server does not need rpcbind,
it makes sense to have an option that implements this.

This patch adds a "-R" option that disables the Mount
protocol (not used by NFSv4) and does not register
with rpcbind.

Changes are required to /etc/rc.d/mountd and /etc/rc.d/nfsd.
Those will be in a separate commit.

Test Plan

Tried an assortment of configurations, both with
and without -R, to see that it works.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bcr added a subscriber: bcr.

OK from manpages.

Fix a bug where the sig_mask being used as the
argument to sigsuspend() was set to the wrong
bits, where SIGHUP was blocked.

Added asomers@ in case he'd like ot review this.

This revision is now accepted and ready to land.Oct 23 2020, 11:55 PM

The nesting is quite deep at this point, it would probably make sense to break things up a little but that's orthogonal to this change.

It looks fine to me, but I'm not very knowledgeable in this area.