HomeFreeBSD

jail: Change both root and working directories in jail_attach(2)

Description

jail: Change both root and working directories in jail_attach(2)

jail_attach(2) performs an internal chroot operation, leaving it up to
the calling process to assure the working directory is inside the jail.

Add a matching internal chdir operation to the jail's root. Also
ignore kern.chroot_allow_open_directories, and always disallow the
operation if there are any directory descriptors open.

Reported by: mjg
Approved by: markj, kib
MFC after: 3 days

Details

Provenance
jamieAuthored on Feb 19 2021, 10:13 PM
Parents
R10:0f9544d03e89: iflib: Fix detach of pseudo interfaces
Branches
Unknown
Tags
Unknown

Event Timeline