diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2018-09-17 09:12:38 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-09-26 17:29:17 +0200 |
commit | 89f180201cd8c0f3ce5cb6e8dd7e2b3cbcf71527 (patch) | |
tree | e6ff107f397322e49d006b9abc5f6663037bce3e /src/nspawn | |
parent | Make Watchdog Signal Configurable (diff) | |
download | systemd-89f180201cd8c0f3ce5cb6e8dd7e2b3cbcf71527.tar.xz systemd-89f180201cd8c0f3ce5cb6e8dd7e2b3cbcf71527.zip |
nspawn: chown() the legacy hierarchy when it's used in a container
This is a follow-up to 720f0a2f3c928cc9379501a52146be9fbb4d9be2.
Closes https://github.com/systemd/systemd/issues/10026
Closes https://github.com/systemd/systemd/issues/9563
Diffstat (limited to 'src/nspawn')
-rw-r--r-- | src/nspawn/nspawn-cgroup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c index f7ec077f7b..8732c9e2aa 100644 --- a/src/nspawn/nspawn-cgroup.c +++ b/src/nspawn/nspawn-cgroup.c @@ -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 */ |