scope: allow unprivileged delegation on scopes

Previously it was possible to set delegate property for scope, but you
were not able to allow unprivileged process to manage the scope's cgroup
hierarchy. This is useful when launching manager process that  will run
unprivileged but is supposed to manage its own (scope) sub-hierarchy.

Fixes #21683
This commit is contained in:
Michal Sekletar
2022-08-04 17:01:13 +02:00
committed by Lennart Poettering
parent a552061ebb
commit 03860190fe
7 changed files with 143 additions and 17 deletions
+1
View File
@@ -169,6 +169,7 @@ DEFINE_STRING_TABLE_LOOKUP(path_state, PathState);
static const char* const scope_state_table[_SCOPE_STATE_MAX] = {
[SCOPE_DEAD] = "dead",
[SCOPE_START_CHOWN] = "start-chown",
[SCOPE_RUNNING] = "running",
[SCOPE_ABANDONED] = "abandoned",
[SCOPE_STOP_SIGTERM] = "stop-sigterm",
+1
View File
@@ -114,6 +114,7 @@ typedef enum PathState {
typedef enum ScopeState {
SCOPE_DEAD,
SCOPE_START_CHOWN,
SCOPE_RUNNING,
SCOPE_ABANDONED,
SCOPE_STOP_SIGTERM,