From 17a40d649c9dfc539b18784c644d8a45916ecd68 Mon Sep 17 00:00:00 2001 From: Ciju Rajan K Date: Wed, 15 Dec 2010 16:49:23 +0530 Subject: [PATCH] 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 -- 2.47.2