Commit 28bb9321 by Qiang Huang Committed by Stéphane Graber

cgroup.c: redefine the valid cgroup name

parent b408e70d
......@@ -1669,7 +1669,11 @@ bool is_valid_cgroup(const char *name)
{
const char *p;
for (p = name; *p; p++) {
if (*p < 32 || *p == 127 || *p == '/')
/* Use the ASCII printable characters range(32 - 127)
* is reasonable, we kick out 32(SPACE) because it'll
* break legacy lxc-ls
*/
if (*p <= 32 || *p >= 127 || *p == '/')
return false;
}
return strcmp(name, ".") != 0 && strcmp(name, "..") != 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment