mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-24 22:07:01 +00:00
cgroup.c: redefine the valid cgroup name
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com> Acked-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
b408e70daf
commit
28bb9321e2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user