HomeFreeBSD

fix(mount): do not truncate shares not zfs mount

Description

fix(mount): do not truncate shares not zfs mount

When running zfs share -a resetting the exports.d/zfs.exports makes
sense the get a clean state.
Truncating was also called with zfs mount which would not populate the
file again.
Add test to verify shares persist after mount -a.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Stefan Lendl <s.lendl@proxmox.com>
Closes #15607
Closes #15660

Details

Provenance
Stefan Lendl <1321542+stfl@users.noreply.github.com>Authored on Jan 12 2024, 8:05 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jan 29 2024, 10:53 PM
Parents
rG8b1c6db3d2f3: Fix a potential use-after-free in zfs_setsecattr()
Branches
Unknown
Tags
Unknown