]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
When we invoke cgroup_get_cgroup() to get the cgroup meta data, the
authorCiju Rajan K <ciju@linux.vnet.ibm.com>
Wed, 15 Dec 2010 11:19:23 +0000 (16:49 +0530)
committerBalbir Singh <balbir@linux.vnet.ibm.com>
Wed, 15 Dec 2010 11:19:23 +0000 (16:49 +0530)
admin_id and admin_gid are not displayed correctly. This is because
cgroup_fill_cgc() does not differentiate between the cgroup control
files and tasks file. So cgroup->control_uid and cgroup->control_gid
fields are getting populated with the uid and gid of tasks file.

This patch fixes this problem by adding a check in the cgroup_fill_cgc()
function to see if the file is a 'tasks' file or not.

Changes from v1.0:

* Instead of using strstr() using pointer arithmetic to get the last six
characters of the entire path

* Fixed the problem of dealing *tasks* string as part of directory names

Signed-off-by: Ciju Rajan K <ciju@linux.vnet.ibm.com>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>

No differences found