HomeFreeBSD

Allow mounting snapshots in .zfs/snapshot as a regular user

Description

Allow mounting snapshots in .zfs/snapshot as a regular user

Rather than doing a terrible credential swapping hack, we just
check that the thing being mounted is a snapshot, and the mountpoint
is the zfsctl directory, then we allow it.

If the mount attempt is from inside a jail, on an unjailed dataset
(mounted from the host, not by the jail), the ability to mount the
snapshot is controlled by a new per-jail parameter: zfs.mount_snapshot

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Co-authored-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Allan Jude <allan@klarasystems.com>
Sponsored-by: Modirum MDPay
Sponsored-by: Klara Inc.
Closes #13758

Details

Provenance
allanjudeAuthored on Nov 3 2022, 6:53 PM
GitHub <noreply@github.com>Committed on Nov 3 2022, 6:53 PM
Parents
rG11e3416ae78d: Cleanup: Remove branches that always evaluate the same way
Branches
Unknown
Tags
Unknown