diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-04-29 19:15:30 -0300 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-04-30 08:36:01 -0300 |
commit | 5954c07433b134694256b9989f2ad3f85a643976 (patch) | |
tree | 199057819796d79598ee974a8a12101d49ff222a /src/shared/cgroup-util.h | |
parent | aa96c6cb44a6eeccc506ae055aae2519a7f914e1 (diff) |
cgroup: do not allow manipulating the cgroup path of units within the systemd:/system subtree
Diffstat (limited to 'src/shared/cgroup-util.h')
-rw-r--r-- | src/shared/cgroup-util.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/shared/cgroup-util.h b/src/shared/cgroup-util.h index a2ee72d67f..7bd02c1008 100644 --- a/src/shared/cgroup-util.h +++ b/src/shared/cgroup-util.h @@ -28,6 +28,21 @@ #include "set.h" #include "def.h" +/* + * General rules: + * + * We accept named hierarchies in the syntax "foo" and "name=foo". + * + * We expect that named hierarchies do not conflict in name with a + * kernel hierarchy, modulo the "name=" prefix. + * + * We always generate "normalized" controller names, i.e. without the + * "name=" prefix. + * + * We require absolute cgroup paths. When returning, we will always + * generate paths with multiple adjacent / removed. + */ + int cg_enumerate_processes(const char *controller, const char *path, FILE **_f); int cg_enumerate_tasks(const char *controller, const char *path, FILE **_f); int cg_read_pid(FILE *f, pid_t *_pid); |