HomeFreeBSD

vfs: Let prison_enforce_statfs zero the fsid

Description

vfs: Let prison_enforce_statfs zero the fsid

Currently, we unconditionally zero the fsid before returning a struct
statfs to a jailed process. Move this into prison_enforce_statfs() so
it only happens if enforce_statfs is greater than 1, or enforce_statfs
is 1 but the mountpoint is outside the jail.

PR: 291301
MFC after: 1 week
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D54214

(cherry picked from commit d4f25d0c7957f0f1960028eec82625c2d6405537)

Details

Provenance
desAuthored on Dec 14 2025, 1:16 PM
Reviewer
kib
Differential Revision
D54214: vfs: Let prison_enforce_statfs zero the fsid
Parents
rGc7cc4706504e: netlink: Don't overwrite existing data in a linear buffer in snl_writer
Branches
Unknown
Tags
Unknown