disable by default cgroups starting with lxc/ and ending with /ns; fixes #1397
Costa Tsaousis (ktsaou) committed
Dec 20, 2016 at 00:28 UTC
8a54cf0f0a33c9da0503ecbb4126eb1aba8b2b0d
1 file changed
+3
-1
src/sys_fs_cgroup.c
+3
-1
@@ -703,7 +703,9 @@ struct cgroup *cgroup_add(const char *id) {
703
(len > 6 && !strncmp(&chart_id[len - 6], ".mount", 6)) ||
704
(len > 8 && !strncmp(&chart_id[len - 8], ".session", 8)) ||
705
(len > 8 && !strncmp(&chart_id[len - 8], ".service", 8)) ||
706
- (len > 10 && !strncmp(&chart_id[len - 10], ".partition", 10))
706
+ (len > 10 && !strncmp(&chart_id[len - 10], ".partition", 10)) ||
707
+ // starts and ends with them
708
+ (len > 7 && !strncmp(chart_id, "lxc/", 4) && !strncmp(&chart_id[len - 3], "/ns", 3)) // #1397
709
) {
710
def = 0;
711
debug(D_CGROUP, "cgroup '%s' is %s (by default)", id, (def)?"enabled":"disabled");