Re: [LTP] [PATCH STAGING v2 04/16] fchroot01: test fchroot() with a directory fd
Cyril Hrubis <[email protected]>
| Newsgroups | it.linux.lists.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