]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgfs: prune the init scope from paths
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Sun, 31 Jan 2016 15:34:54 +0000 (16:34 +0100)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 17 Nov 2016 22:51:09 +0000 (17:51 -0500)
Just as cgmanager does, if we are calculating a task's paths, drop
the trailing '/init.scope'.  We don't want the container to sit under
there.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/cgfs.c

index 1c7cb98219d5adb2452c37cec1e6848059ac0f0b..9caa40bf68ddad414d30e352c9fe4e5b8b1ca7d2 100644 (file)
@@ -1661,6 +1661,7 @@ lxc_cgroup_process_info_getx(const char *proc_pid_cgroup_str,
                entry->cgroup_path = strdup(colon2);
                if (!entry->cgroup_path)
                        goto out_error;
+               prune_init_scope(entry->cgroup_path);
 
                *cptr = entry;
                cptr = &entry->next;