HomeFreeBSD

Support accessing .zfs/snapshot via NFS

Description

Support accessing .zfs/snapshot via NFS

This patch is based on the previous work done by @andrey-ve and
@yshui. It triggers the automount by using kern_path() to traverse
to the known snapshout mount point. Once the snapshot is mounted
NFS can access the contents of the snapshot.

Allowing NFS clients to access to the .zfs/snapshot directory would
normally mean that a root user on a client mounting an export with
'no_root_squash' would be able to use mkdir/rmdir/mv to manipulate
snapshots on the server. To prevent configuration mistakes a
zfs_admin_snapshot module option was added which disables the
mkdir/rmdir/mv functionally. System administators desiring this
functionally must explicitly enable it.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2797
Closes #1655
Closes #616

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Aug 28 2015, 9:54 PM
Parents
rGaa9b27080b34: Fix invalid fileid for snapshot root dentry
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG0500e835af3e: Support accessing .zfs/snapshot via NFS (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Sep 4 2015, 8:23 PM