]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
cgcreate: fix the wrong uid/gid set.
authorWeng Meiling <wengmeiling.weng@huawei.com>
Fri, 27 Sep 2013 05:27:30 +0000 (07:27 +0200)
committerWeng Meiling <wengmeiling.weng@huawei.com>
Fri, 27 Sep 2013 05:27:30 +0000 (07:27 +0200)
commit4399023a9d19129459a19e863070f03aa8150ac0
treeef3f471b12dd0cf99d7344be1cd5674240d273b0
parent9f8cf84c4653d0bc7ef4ce3738fb614e4994fe21
cgcreate: fix the wrong uid/gid set.

When setting the cgconfig.conf as follow:

mount {
memory = /cgroup/memory;
}

group . {
perm {
task {
gid = w00227741;
uid = w00227741;
fperm =755;
}
admin {
gid = w00227741;
uid = w00227741;
fperm =755;
dperm = 755;
}
}
memory {
}
}

and restart the cgconfig service. Then switch to the user w00227741
and cgcreate cgroup like this:

# lscgroup
memory:/

# cgcreate -g memory:test
cgcreate: can't create cgroup test: Operation not permitted

the command report the error, but the cgroup test has created:

# lscgroup
memory:/
memory:/test

this patch fix the problem.

Signed-off-by: Weng Meiling <wengmeiling.weng@huawei.com>
Acked-by: Ivana Hutarova Varekova <varekova@redhat.com>
src/api.c