]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Modify sharenfs=on default behavior
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 14 Oct 2019 02:13:26 +0000 (19:13 -0700)
committerGitHub <noreply@github.com>
Mon, 14 Oct 2019 02:13:26 +0000 (19:13 -0700)
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 <ezomori.nozomu@gmail.com>
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #9397
Closes #9425

lib/libshare/nfs.c
man/man8/zfs.8

index 5c8976e15aa61444f58cf7640bc350ef890b66e0..7cc5ae43f50061c4cab902530ccb1d234e5bb285 100644 (file)
@@ -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,
index ee7a111ed14dd8256d9d646494b477fcf8eb202c..e391b981062976d6fbcf7eaaf77e4bcf5715cf1a 100644 (file)
@@ -1993,7 +1993,7 @@ If the property is set to
 .Sy on ,
 the dataset is shared using the default options:
 .Pp
-.Em sec=sys,rw,crossmnt,no_subtree_check,no_root_squash
+.Em sec=sys,rw,crossmnt,no_subtree_check
 .Pp
 See
 .Xr exports 5