HomeFreeBSD

vfs cache: Add vn_fullpath_jail(), factor out common code

Description

vfs cache: Add vn_fullpath_jail(), factor out common code

Introduce vn_fullpath_jail(), which returns a path to the passed vnode
relative to the current jail's root. It will be used by mac_do(4) in
a subsequent commit.

Factor out common code between the new variant and vn_fullpath(). While
here, rework the comments a bit.

Add vn_fullpath_jail() to the vn_fullpath.9 manual page. While here,
document all the existing public vn_fullpath*() functions.

Reviewed by: kib (except latest manual page changes)
MFC after: 3 days
Event: EuroBSDCon 2025
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52757

(cherry picked from commit c5a813c9f486da49551c3be2e7700ca0cb0a489a)

Details

Provenance
olceAuthored on Fri, Sep 26, 10:18 AM
Reviewer
kib
Differential Revision
D52757: vfs cache: Add vn_fullpath_jail(), factor out common code
Parents
rG995d37ecd3b6: mac_do.4: Mention "from" part's GID can also match supplementary groups
Branches
Unknown
Tags
Unknown