diff options
Diffstat (limited to 'src/nspawn/nspawn-cgroup.c')
-rw-r--r-- | src/nspawn/nspawn-cgroup.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c index 6d6a8a814b..4ee21c0779 100644 --- a/src/nspawn/nspawn-cgroup.c +++ b/src/nspawn/nspawn-cgroup.c @@ -119,7 +119,7 @@ int create_subcgroup( CGroupUnified unified_requested, uid_t uid_shift, int userns_fd, - bool privileged) { + UserNamespaceMode userns_mode) { _cleanup_free_ char *cgroup = NULL, *payload = NULL; CGroupMask supported; @@ -163,14 +163,14 @@ int create_subcgroup( if (!payload) return log_oom(); - if (privileged) + if (userns_mode != USER_NAMESPACE_MANAGED) r = cg_create_and_attach(SYSTEMD_CGROUP_CONTROLLER, payload, pid); else r = cg_create(SYSTEMD_CGROUP_CONTROLLER, payload); if (r < 0) return log_error_errno(r, "Failed to create %s subcgroup: %m", payload); - if (privileged) { + if (userns_mode != USER_NAMESPACE_MANAGED) { _cleanup_free_ char *fs = NULL; r = cg_get_path(SYSTEMD_CGROUP_CONTROLLER, payload, NULL, &fs); if (r < 0) |