git: d4380c0cdd05 - main - jail: Change both root and working directories in jail_attach(2)
Kyle Evans
kevans at freebsd.org
Fri Mar 5 17:06:15 UTC 2021
On Fri, Feb 19, 2021 at 4:13 PM Jamie Gritton <jamie at freebsd.org> wrote:
>
> The branch main has been updated by jamie:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=d4380c0cdd0517dc038403dd5c99242ce78bdeb5
>
> commit d4380c0cdd0517dc038403dd5c99242ce78bdeb5
> Author: Jamie Gritton <jamie at FreeBSD.org>
> AuthorDate: 2021-02-19 22:13:35 +0000
> Commit: Jamie Gritton <jamie at FreeBSD.org>
> CommitDate: 2021-02-19 22:13:35 +0000
>
> 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.
>
Any reason we shouldn't go ahead and drop the explicit chdir() from
jexec(8) and jail(8) now that jail_attach *is* guaranteed to chdir
along with its chroot?
Thanks,
Kyle Evans
More information about the dev-commits-src-main
mailing list