On Fri 27-05-11 14:28:05, Jan Safranek wrote:
> On 05/13/2011 03:17 PM, Michal Hocko wrote:
[...]
> > index 53c76e8..eb9f902 100644
> > --- a/src/api.c
> > +++ b/src/api.c
> > @@ -1456,6 +1456,13 @@ int cgroup_create_cgroup(struct cgroup *cgroup, int
> > ignore_ownership)
> > cgroup_dbg("Changing ownership of %s\n", fts_path[0]);
> > error = cg_chown_recursive(fts_path,
> > cgroup->control_uid, cgroup->control_gid);
> > + if (!error) {
> > + error = cg_chmod_recursive(cgroup,
> > + cgroup->control_dperm,
> > + cgroup->control_dperm !=
> > NO_PERMS,
> > + cgroup->control_fperm,
> > + cgroup->control_fperm !=
> > NO_PERMS);
> > + }
>
> cg_chmod_recursive works on entire cgroup, while cg_chown_recursive
> works per controller.
>
> And when looking at cg_chmod_recursive, it is badly broken, it changes
> permissions only in the first hierarchy the cgroup is in. There is
> simple way how to fix it, I've already sent a patch. With my patch, you
> can then use cg_chmod_recursive_controller() here
OK, I will rebase it on top of your patch once it is in the git tree and
use cg_chmod_recursive_controller instead.
--
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9
Czech Republic
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel