Re: [PATCH STAGING v2 04/16] fchroot01: test fchroot() with a directory fd

Cyril Hrubis <[email protected]>
Newsgroups gmane.linux.ltp
Message-ID <[email protected]>
Hi!
> +/*\
> + * Test that :manpage:`fchroot(2)` with a regular directory fd moves the
> + * process root to the directory referenced by the fd.
> + *
> + * This is the fd-based counterpart of :manpage:`chroot(2)`, introduced in
> + * Linux v7.3. Root is required because :manpage:`fchroot(2)` with a regular
> + * directory fd requires ``CAP_SYS_CHROOT``.
> + *
> + * The syscall runs in a forked child so that the root of the parent
> + * process, which the test framework needs for its cleanup, is left
> + * untouched.

I do not think that we need this. The process that runs the run()
function is forked from the library process in order for the test to be
isolated from the library.

As long as we do not have a custom cleanup() function that needs to run
outside of the jail we do not have to fork in the run().

-- 
Cyril Hrubis
[email protected]

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.