From: Ciju Rajan K Date: Wed, 15 Dec 2010 11:19:23 +0000 (+0530) Subject: When we invoke cgroup_get_cgroup() to get the cgroup meta data, the X-Git-Tag: v0.37.1~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17a40d649c9dfc539b18784c644d8a45916ecd68;p=thirdparty%2Flibcgroup.git When we invoke cgroup_get_cgroup() to get the cgroup meta data, the 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 Acked-by: Dhaval Giani Signed-off-by: Balbir Singh ---