On Fri, Dec 10, 2010 at 10:47 AM, Ciju Rajan K <[email protected]> wrote: > Hi All, > > 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. >
As we discussed on IRC, I am not sure this is the right approach. Two requests, 1. Extensively test with groups which have tasks as a substring in the their name. 2. Comment why strstr is safe. If you cannot prove it, I would rather use a strncmp for the last 6 chars with /tasks. Also, could you please inline the patch? Makes it a bit easier to comment on it ;-) Thanks! Dhaval ------------------------------------------------------------------------------ _______________________________________________ Libcg-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libcg-devel
