Skip to content

Commit

Permalink
afs: proc cells and rootcell are writeable
Browse files Browse the repository at this point in the history
Both proc files are writeable and used for configuring cells. But
there is missing correct mode flag for writeable files. Without
this patch both proc files are read only.

[ It turns out they aren't really read-only, since root can write to
  them even if the write bit isn't set due to CAP_DAC_OVERRIDE ]

Signed-off-by: Pali Rohár <[email protected]>
Signed-off-by: David Howells <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
pali authored and torvalds committed Feb 1, 2014
1 parent 5a5e75f commit 1bda2ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/afs/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ int afs_proc_init(void)
if (!proc_afs)
goto error_dir;

if (!proc_create("cells", 0, proc_afs, &afs_proc_cells_fops) ||
!proc_create("rootcell", 0, proc_afs, &afs_proc_rootcell_fops))
if (!proc_create("cells", 0644, proc_afs, &afs_proc_cells_fops) ||
!proc_create("rootcell", 0644, proc_afs, &afs_proc_rootcell_fops))
goto error_tree;

_leave(" = 0");
Expand Down

0 comments on commit 1bda2ac

Please sign in to comment.