diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2018-09-17 07:12:38 +0000 |
---|---|---|
committer | The Plumber <50238977+systemd-rhel-bot@users.noreply.github.com> | 2020-05-22 10:30:35 +0200 |
commit | 9b40608e772dac4e0fa7b5be3a283360efb282e7 (patch) | |
tree | a5682ec7dd42d2062b480bcd3a409b39d574437c | |
parent | 63e2cd09f2c266d9a67937f2d1c13d518c988312 (diff) | |
download | systemd-9b40608e772dac4e0fa7b5be3a283360efb282e7.tar.gz |
nspawn: chown() the legacy hierarchy when it's used in a containerv239-31.2
This is a follow-up to 720f0a2f3c928cc9379501a52146be9fbb4d9be2.
Closes https://github.com/systemd/systemd/issues/10026
Closes https://github.com/systemd/systemd/issues/9563
(cherry picked from commit 89f180201cd8c0f3ce5cb6e8dd7e2b3cbcf71527)
(cherry picked from commit f4a34d97bd7e1564a51f590df591cb31a1a3f333)
Resolves: #1837423
-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 d8a39a6959..a231622e29 100644 --- a/src/nspawn/nspawn-cgroup.c +++ b/src/nspawn/nspawn-cgroup.c @@ -55,7 +55,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 */ |