]> xenbits.xensource.com Git - 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)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 13 May 2013 13:28:46 +0000 (14:28 +0100)
Escaping a leading '.' with '_' in the cgroup names

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/util/vircgroup.c

index 473d2fc42926285e9b08580dab41e103de62a43c..4de1d55cff7537e8b3b046725807d98071ef600e 100644 (file)
@@ -1106,7 +1106,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")))