]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add support for the new mountd -R option.
authorrmacklem <rmacklem@FreeBSD.org>
Fri, 6 Nov 2020 16:33:42 +0000 (16:33 +0000)
committerrmacklem <rmacklem@FreeBSD.org>
Fri, 6 Nov 2020 16:33:42 +0000 (16:33 +0000)
commit1b1e8b4acd6af7ec0825fe21f385da04cb78d8b7
tree820bdd701fa8787e1323632ffe9dcd81881d9c9c
parentda6b4c40f1b1b14cc1dd35f89e0c289b45c207cc
Add support for the new mountd -R option.

r376026 added a new "-R" option to mountd, which tells it to
not support the Mount protocol (not used by NFSv4) and not
register with rpcbind.
Rpcbind is considered a security issue by some sites now.

This patch adds a new yes/no variable called nfsv4_server_only.
When that is set, make vfs.nfsd.server_min_vers=4 and set "=R"
for mountd.
Setting vfs.nfsd.server_min_vers=4 tells nfsd to not register with rpcbind.
While here, add a check for "load_kld nfsd" failing to nfsd.

Reviewed by: 0mp
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D26938
libexec/rc/rc.conf
libexec/rc/rc.d/mountd
libexec/rc/rc.d/nfsd