]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
libcgroup: ignore 'tasks' file when changing permission of control files
authorJan Safranek <jsafrane@redhat.com>
Tue, 27 Sep 2011 06:50:09 +0000 (08:50 +0200)
committerJan Safranek <jsafrane@redhat.com>
Tue, 27 Sep 2011 06:50:09 +0000 (08:50 +0200)
commitb5c6822fc54d4ee75f05dba960c891b339b6bd77
treee56a1153d1db3d1287b0c32e059772b55b2d71e3
parent97ad05f786fe2be9196b2724a2d59e514055d89a
libcgroup: ignore 'tasks' file when changing permission of control files

When cgroup_create_cgroup() is called with different control_fperm and
task_fperm, libcgroup first changes permissions of *all* files to match
the control_fperm, which includes the also the tasks file and it might
loose some permission bits. The tasks file is then modulated by
control_fperm, but because umask-style of control_fperm, it might get
lower permissions that users would expect.

Therefore 'tasks' file must be skipped when using control_fperm.

Changelog since v1:
  - use list of ignored files, cg_chmod_recursive_controller is called from
    cg_chmod_recursive, which should chmod all files, incl. 'tasks'.

Changelog since v2:
  - renamed the list with ignored files.

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
src/api.c