cgcreate: fix the wrong uid/gid set.
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 <1c2ffc98dae56b3d68b4a6e96a296f2035e8909a@huawei.com>
Acked-by: Ivana Hutarova Varekova <2e3918a0a366ea7e658a2062ab582c898a7e1b1b@redhat.com>

rafalmiel/libcg,rafalmiel/libcg,rafalmiel/libcg,rafalmiel/libcg