From a0ab566574303be1ca12cdb334f284cfd407caa5 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 3 May 2013 19:02:24 +0200 Subject: cgroup: when escaping a cgroup object name, also escape names that start with a dot --- src/shared/cgroup-util.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/shared') diff --git a/src/shared/cgroup-util.c b/src/shared/cgroup-util.c index c5a5f8df83..43c415d760 100644 --- a/src/shared/cgroup-util.c +++ b/src/shared/cgroup-util.c @@ -1527,7 +1527,12 @@ char *cg_escape(const char *p) { /* The return value of this function (unlike cg_unescape()) * needs free()! */ - if (p[0] == '_' || streq(p, "notify_on_release") || streq(p, "release_agent") || streq(p, "tasks")) + if (p[0] == 0 || + p[0] == '_' || + p[0] == '.' || + streq(p, "notify_on_release") || + streq(p, "release_agent") || + streq(p, "tasks")) need_prefix = true; else { const char *dot; -- cgit v1.2.3-54-g00ecf