]> git.ipfire.org Git - thirdparty/systemd.git/commit
process-util: revamp flags handling in namespace_fork()
authorMike Yuan <me@yhndnzj.com>
Sun, 14 Dec 2025 15:02:17 +0000 (16:02 +0100)
committerMike Yuan <me@yhndnzj.com>
Sat, 20 Dec 2025 13:14:24 +0000 (14:14 +0100)
commited0f6758c82f4380baf31612290a395bb7df87a6
treeba2485339c0ab229c8e0c34974a55096fb054b29
parent8c007f68ffc372e494fc27ca950d2e639743030f
process-util: revamp flags handling in namespace_fork()

* Specifying all 3 of FORK_DEATHSIG_SIG{KILL,TERM,INT} for
  the middle man makes zero sense. Use SIGKILL only.
* Make sure operations on except_fds work sensibly - close/pack/
  de-ocloexecify fds only in the second level, so that the namespace
  fds remain usable across first safe_fork().
* Fire FORK_NEW_*NS after attaching to the desired namespaces,
  not already in the outer process.
* Insist on PDEATHSIG being enabled to ensure propagation of killing.
* Suppress more redundant flags.
src/basic/process-util.c