chiark / gitweb /
process-util: add a new FORK_MOUNTNS_SLAVE flag for safe_fork()
authorLennart Poettering <lennart@poettering.net>
Fri, 23 Mar 2018 19:52:46 +0000 (20:52 +0100)
committerSven Eden <yamakuzure@gmx.net>
Fri, 24 Aug 2018 14:47:08 +0000 (16:47 +0200)
commit299f585a0692b6e7a438a25a6577fc6f777659ea
treec99adda25c29d973b905b96413c9937b8d23079f
parentb9e2dff07fe8b82a50b081b6032e547632e338f9
process-util: add a new FORK_MOUNTNS_SLAVE flag for safe_fork()

We already have a flag for creating a new mount namespace for the child.
Let's add an extension to that: a new FORK_MOUNTNFS_SLAVE flag. When
used in combination will mark all mounts in the child namespace as
MS_SLAVE so that the child can freely mount or unmount stuff but it
won't leak into the parent.
src/basic/process-util.c
src/basic/process-util.h