summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2019-10-13 19:13:26 -0700
committerGitHub <[email protected]>2019-10-13 19:13:26 -0700
commitd292307212d68016455422a3fe764968f552b031 (patch)
treefe8d0e29ce688e8d9de542a0c5eb3d6c262dba6d /lib
parent2c6fa6eafbac4acffb1304132a8e06cfe4d71cde (diff)
Modify sharenfs=on default behavior
While it may sometimes be convenient to export an NFS filesystem with no_root_squash it should not be the default behavior. Align the default behavior with the Linux NFS server defaults. To restore the previous behavior use 'zfs set sharenfs="no_root_squash,..."'. Reviewed-by: loli10K <[email protected]> Reviewed-by: Richard Laager <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #9397 Closes #9425
Diffstat (limited to 'lib')
-rw-r--r--lib/libshare/nfs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libshare/nfs.c b/lib/libshare/nfs.c
index 5c8976e15..7cc5ae43f 100644
--- a/lib/libshare/nfs.c
+++ b/lib/libshare/nfs.c
@@ -387,9 +387,10 @@ get_linux_shareopts(const char *shareopts, char **plinux_opts)
*plinux_opts = NULL;
- /* default options for Solaris shares */
+ /* no_subtree_check - Default as of nfs-utils v1.1.0 */
(void) add_linux_shareopt(plinux_opts, "no_subtree_check", NULL);
- (void) add_linux_shareopt(plinux_opts, "no_root_squash", NULL);
+
+ /* mountpoint - Restrict exports to ZFS mountpoints */
(void) add_linux_shareopt(plinux_opts, "mountpoint", NULL);
rc = foreach_nfs_shareopt(shareopts, get_linux_shareopts_cb,