core: Add DelegateNamespaces=

This delegates one or more namespaces to the service. Concretely,
this setting influences in which order we unshare namespaces. Delegated
namespaces are unshared *after* the user namespace is unshared. Other
namespaces are unshared *before* the user namespace is unshared.

Fixes #35369
This commit is contained in:
Daan De Meyer
2025-03-01 13:54:58 +01:00
parent 7904c1dbe6
commit 8234cd9989
12 changed files with 295 additions and 36 deletions
+1
View File
@@ -611,6 +611,7 @@ void exec_context_init(ExecContext *c) {
.timeout_clean_usec = USEC_INFINITY,
.capability_bounding_set = CAP_MASK_UNSET,
.restrict_namespaces = NAMESPACE_FLAGS_INITIAL,
.delegate_namespaces = NAMESPACE_FLAGS_INITIAL,
.log_level_max = -1,
#if HAVE_SECCOMP
.syscall_errno = SECCOMP_ERROR_NUMBER_KILL,