]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC: r367423
authorRick Macklem <rmacklem@FreeBSD.org>
Sun, 29 Nov 2020 23:23:08 +0000 (23:23 +0000)
committerRick Macklem <rmacklem@FreeBSD.org>
Sun, 29 Nov 2020 23:23:08 +0000 (23:23 +0000)
commit9e0ed5897b0dacc515a5d786fd640e9db0251cd0
treefdceb9b536e302d2aabe43be08bc145baf354ad4
parentfeb2bf450aca7cadc2eb3c430a24bb24496d8308
MFC: r367423
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.
libexec/rc/rc.conf
libexec/rc/rc.d/mountd
libexec/rc/rc.d/nfsd