Skip to content

Commit 1bda2ac

Browse files
palitorvalds
authored andcommitted
afs: proc cells and rootcell are writeable
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]>
1 parent 5a5e75f commit 1bda2ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/afs/proc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ int afs_proc_init(void)
130130
if (!proc_afs)
131131
goto error_dir;
132132

133-
if (!proc_create("cells", 0, proc_afs, &afs_proc_cells_fops) ||
134-
!proc_create("rootcell", 0, proc_afs, &afs_proc_rootcell_fops))
133+
if (!proc_create("cells", 0644, proc_afs, &afs_proc_cells_fops) ||
134+
!proc_create("rootcell", 0644, proc_afs, &afs_proc_rootcell_fops))
135135
goto error_tree;
136136

137137
_leave(" = 0");

0 commit comments

Comments
 (0)