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)
Wed, May 1, 11:15 AM
Unknown Object (File)
Wed, May 1, 11:15 AM
Unknown Object (File)
Wed, May 1, 11:15 AM
Unknown Object (File)
Wed, May 1, 10:05 AM
Unknown Object (File)
Wed, May 1, 2:05 AM
Unknown Object (File)
Mar 12 2024, 9:48 AM
Unknown Object (File)
Mar 12 2024, 9:48 AM
Unknown Object (File)
Mar 12 2024, 9:48 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.