]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgfs: prune the init scope from paths 785/head
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Sun, 31 Jan 2016 15:34:54 +0000 (16:34 +0100)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Sun, 31 Jan 2016 15:34:54 +0000 (16:34 +0100)
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 96321695601f96d1734b9346af4c22dc347fdb93..b43e1ce01cc6471efa2adde79a115dfa01a45f43 100644 (file)
@@ -1662,6 +1662,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;