libcgroup: Give write access to the group as well Though we had group details to allow groups access to the cgroup fs, we had not given the group write access. Correct this bug.
Signed-off-by: Dhaval Giani <[email protected]> Signed-off-by: Balbir Singh <[email protected]> --- api.c | 11 +++++++++++ 1 file changed, 11 insertions(+) Index: trunk/api.c =================================================================== --- trunk.orig/api.c 2008-12-17 16:48:52.000000000 +0530 +++ trunk/api.c 2008-12-17 17:53:21.000000000 +0530 @@ -111,11 +111,22 @@ static int cg_chown_file(FTS *fts, FTSEN case FTS_NS: case FTS_DNR: case FTS_DP: + ret = chown(filename, owner, group); + if (ret) + goto fail_chown; + ret = chmod(filename, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | + S_IWGRP | S_IXGRP | S_IROTH | S_IXOTH); + break; case FTS_F: case FTS_DEFAULT: ret = chown(filename, owner, group); + if (ret) + goto fail_chown; + ret = chmod(filename, S_IRUSR | S_IWUSR | S_IRGRP | + S_IWGRP | S_IROTH); break; } +fail_chown: return ret; } -- regards, Dhaval ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Libcg-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libcg-devel
