]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: Make DelegateNamespaces= work for user managers with CAP_SYS_ADMIN (#36771)
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 19 Mar 2025 21:28:18 +0000 (06:28 +0900)
committerGitHub <noreply@github.com>
Wed, 19 Mar 2025 21:28:18 +0000 (06:28 +0900)
commitdb4b4e0cd364ec58db72f3f2fb992b2ce8244b3b
tree1b01c211baff7c12d22ca93e947d74255679db05
parentb0fe8df5a9fab4b10441d3e190d994c79edcb528
parent38748596f0783f2b773bd95d4af4d83f5b5ff872
core: Make DelegateNamespaces= work for user managers with CAP_SYS_ADMIN (#36771)

Currently DelegateNamespaces= only works for services spawned by the
system manager. User managers will always unshare the user namespace
first even if they're running with CAP_SYS_ADMIN.

Let's add support for DelegateNamespaces= for user managers if they're
running with CAP_SYS_ADMIN. By default, we'll still delegate all
namespaces
for user managers, but this can now be overridden by explicitly passing
DelegateNamespaces=.

If a user manager is running without CAP_SYS_ADMIN, the user manager is
still always unshared first just like before.