mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 19:28:53 +03:00
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
This commit is contained in:
@@ -955,6 +955,21 @@ Seconds to expire .zfs/snapshot
|
||||
Default value: \fB300\fR.
|
||||
.RE
|
||||
|
||||
.sp
|
||||
.ne 2
|
||||
.na
|
||||
\fBzfs_admin_snapshot\fR (int)
|
||||
.ad
|
||||
.RS 12n
|
||||
Allow the creation, removal, or renaming of entries in the .zfs/snapshot
|
||||
directory to cause the creation, destruction, or renaming of snapshots.
|
||||
When enabled this functionality works both locally and over NFS exports
|
||||
which have the 'no_root_squash' option set. This functionality is disabled
|
||||
by default.
|
||||
.sp
|
||||
Use \fB1\fR for yes and \fB0\fR for no (default).
|
||||
.RE
|
||||
|
||||
.sp
|
||||
.ne 2
|
||||
.na
|
||||
|
||||
Reference in New Issue
Block a user