Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <pali.rohar@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Pali Rohár and committed by
Linus Torvalds
1bda2ac0 5a5e75f4

+2 -2
+2 -2
fs/afs/proc.c
··· 130 130 if (!proc_afs) 131 131 goto error_dir; 132 132 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)) 135 135 goto error_tree; 136 136 137 137 _leave(" = 0");