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)
Tue, Dec 30, 10:47 AM
Unknown Object (File)
Mon, Dec 29, 2:59 AM
Unknown Object (File)
Thu, Dec 25, 10:43 AM
Unknown Object (File)
Fri, Dec 19, 12:08 PM
Unknown Object (File)
Tue, Dec 16, 8:11 AM
Unknown Object (File)
Tue, Dec 16, 7:33 AM
Unknown Object (File)
Dec 2 2025, 8:17 AM
Unknown Object (File)
Nov 16 2025, 11:25 PM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 34126

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.