]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Escaping leading '.' in cgroup names
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 3 May 2013 19:56:50 +0000 (20:56 +0100)
committerJim Fehlig <jfehlig@suse.com>
Thu, 11 Jul 2013 16:37:49 +0000 (10:37 -0600)
Escaping a leading '.' with '_' in the cgroup names

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit 0ced83dcfbb19af1201202e1af0a7073c338aabd)

src/util/vircgroup.c

index 006391d8947b9f7e4d1ab80b3f5a7a9edd0fa3e6..028ef2c40e673732e16b74dbbc84d9b95a5c0ae2 100644 (file)
@@ -1118,7 +1118,8 @@ static int virCgroupPartitionNeedsEscaping(const char *path)
     if (STRPREFIX(path, "cgroup."))
         return 1;
 
-    if (path[0] == '_')
+    if (path[0] == '_' ||
+        path[0] == '.')
         return 1;
 
     if (!(fp = fopen("/proc/cgroups", "r")))