On 07/09/2013 06:56 AM, Ivana Hutarova Varekova wrote: > This patch fixes cgroup_init_templates_cache and > cgroup_reload_cached_templates functions. Their have to copy not only > controllers and > their structures but all variables (controller name, permissions and > ownership) for templates. > > Signed-off-by: Ivana Hutarova Varekova <varek...@redhat.com>
Acked-By: Jan Safranek <jsafr...@redhat.com> > --- > > src/config.c | 38 ++++++++++++++++++++++++++++++++++++-- > 1 files changed, 36 insertions(+), 2 deletions(-) > > diff --git a/src/config.c b/src/config.c > index f3ac4dd..b2b8a13 100644 > --- a/src/config.c > +++ b/src/config.c > @@ -1473,7 +1473,24 @@ int cgroup_reload_cached_templates(char *pathname) > } > > for (i = 0; i < template_table_index; i++) { > - cgroup_copy_cgroup(&config_template_table[i], > &template_table[i]); > + cgroup_copy_cgroup(&template_table[i], > + &config_template_table[i]); > + strcpy((template_table[i]).name, > + (config_template_table[i]).name); > + template_table[i].tasks_uid = > + config_template_table[i].tasks_uid; > + template_table[i].tasks_gid = > + config_template_table[i].tasks_gid; > + template_table[i].task_fperm = > + config_template_table[i].task_fperm; > + template_table[i].control_uid = > + config_template_table[i].control_uid; > + template_table[i].control_gid = > + config_template_table[i].control_gid; > + template_table[i].control_fperm = > + config_template_table[i].control_fperm; > + template_table[i].control_dperm = > + config_template_table[i].control_dperm; > } > > return ret; > @@ -1511,7 +1528,24 @@ int cgroup_init_templates_cache(char *pathname) > } > > for (i = 0; i < template_table_index; i++) { > - cgroup_copy_cgroup(&config_template_table[i], > &template_table[i]); > + cgroup_copy_cgroup(&template_table[i], > + &config_template_table[i]); > + strcpy((template_table[i]).name, > + (config_template_table[i]).name); > + template_table[i].tasks_uid = > + config_template_table[i].tasks_uid; > + template_table[i].tasks_gid = > + config_template_table[i].tasks_gid; > + template_table[i].task_fperm = > + config_template_table[i].task_fperm; > + template_table[i].control_uid = > + config_template_table[i].control_uid; > + template_table[i].control_gid = > + config_template_table[i].control_gid; > + template_table[i].control_fperm = > + config_template_table[i].control_fperm; > + template_table[i].control_dperm = > + config_template_table[i].control_dperm; > } > > return ret; > > > ------------------------------------------------------------------------------ > See everything from the browser to the database with AppDynamics > Get end-to-end visibility with application monitoring from AppDynamics > Isolate bottlenecks and diagnose root cause in seconds. > Start your free trial of AppDynamics Pro today! > http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk > _______________________________________________ > Libcg-devel mailing list > Libcg-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/libcg-devel > ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel