summaryrefslogtreecommitdiff
path: root/src/nspawn/nspawn-mount.c
diff options
context:
space:
mode:
authorChristian Brauner <cbrauner@suse.de>2016-07-26 16:49:15 +0200
committerLennart Poettering <lennart@poettering.net>2016-07-26 16:49:15 +0200
commit5a8ff0e61dd8094b2b5d0b35df2ca13b489e0dfa (patch)
tree367e18e5aea7ae38ea4fd0d811a16a62987cbce5 /src/nspawn/nspawn-mount.c
parent1d3c86c06fca8311923fcf81af0ab0bbb66e1edd (diff)
nspawn: add SYSTEMD_NSPAWN_USE_CGNS env variable (#3809)
SYSTEMD_NSPAWN_USE_CGNS allows to disable the use of cgroup namespaces.
Diffstat (limited to 'src/nspawn/nspawn-mount.c')
-rw-r--r--src/nspawn/nspawn-mount.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nspawn/nspawn-mount.c b/src/nspawn/nspawn-mount.c
index ac93357ef4..803caef3dd 100644
--- a/src/nspawn/nspawn-mount.c
+++ b/src/nspawn/nspawn-mount.c
@@ -916,11 +916,12 @@ int mount_cgroups(
const char *dest,
bool unified_requested,
bool userns, uid_t uid_shift, uid_t uid_range,
- const char *selinux_apifs_context) {
+ const char *selinux_apifs_context,
+ bool use_cgns) {
if (unified_requested)
return mount_unified_cgroups(dest);
- else if (cg_ns_supported())
+ else if (use_cgns && cg_ns_supported())
return mount_legacy_cgns_supported(userns, uid_shift, uid_range, selinux_apifs_context);
return mount_legacy_cgns_unsupported(dest, userns, uid_shift, uid_range, selinux_apifs_context);