提交 1bda2ac0 编写于 作者: P Pali Rohár 提交者: Linus Torvalds

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: NPali Rohár <pali.rohar@gmail.com>
Signed-off-by: NDavid Howells <dhowells@redhat.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 5a5e75f4
...@@ -130,8 +130,8 @@ int afs_proc_init(void) ...@@ -130,8 +130,8 @@ int afs_proc_init(void)
if (!proc_afs) if (!proc_afs)
goto error_dir; goto error_dir;
if (!proc_create("cells", 0, proc_afs, &afs_proc_cells_fops) || if (!proc_create("cells", 0644, proc_afs, &afs_proc_cells_fops) ||
!proc_create("rootcell", 0, proc_afs, &afs_proc_rootcell_fops)) !proc_create("rootcell", 0644, proc_afs, &afs_proc_rootcell_fops))
goto error_tree; goto error_tree;
_leave(" = 0"); _leave(" = 0");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册