[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] Escaping leading '.' in cgroup names



From: "Daniel P. Berrange" <berrange redhat com>

Escaping a leading '.' with '_' in the cgroup names

Signed-off-by: Daniel P. Berrange <berrange redhat com>
---
 src/util/vircgroup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index 473d2fc..4de1d55 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -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")))
-- 
1.8.1.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]