HomeFreeBSD

nfsd: Fix NFS access to .zfs/snapshot snapshots

Description

nfsd: Fix NFS access to .zfs/snapshot snapshots

When a process attempts to access a snapshot under
/<dataset>/.zfs/snapshot, the snapshot is automounted.
However, without this patch, the automount does not
set mnt_exjail, which results in the snapshot not being
accessible over NFS.

This patch defines a new function called vfs_exjail_clone()
which sets mnt_exjail from another mount point and
then uses that function to set mnt_exjail in the snapshot
automount. A separate patch that is currently a pull request
for OpenZFS, calls this function to fix the problem.

PR: 275200
Approved by: so
Security: FreeBSD-EN-23:22.vfs

(cherry picked from commit f5f277728adec4c5b3e840a1fb16bd16f8cc956d)
(cherry picked from commit a7c25f0d064425bc7a3b170aa441fecf0ae38600)

Details

Provenance
rmacklemAuthored on Nov 23 2023, 3:23 PM
markjCommitted on Dec 4 2023, 3:45 PM
Parents
rG31f6cfca851f: tty: properly check character position when handling IUTF8 backspaces
Branches
Unknown
Tags
Unknown