mirror of
https://github.com/systemd/systemd.git
synced 2025-01-12 13:18:14 +03:00
nspawn: chown() the legacy hierarchy when it's used in a container
This is a follow-up to 720f0a2f3c
.
Closes https://github.com/systemd/systemd/issues/10026
Closes https://github.com/systemd/systemd/issues/9563
This commit is contained in:
parent
c87700a133
commit
89f180201c
@ -59,7 +59,7 @@ int chown_cgroup(pid_t pid, CGroupUnified unified_requested, uid_t uid_shift) {
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to chown() cgroup %s: %m", fs);
|
||||
|
||||
if (unified_requested == CGROUP_UNIFIED_SYSTEMD) {
|
||||
if (unified_requested == CGROUP_UNIFIED_SYSTEMD || (unified_requested == CGROUP_UNIFIED_NONE && cg_unified_controller(SYSTEMD_CGROUP_CONTROLLER) > 0)) {
|
||||
_cleanup_free_ char *lfs = NULL;
|
||||
/* Always propagate access rights from unified to legacy controller */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user