lkml.org 
[lkml]   [2013]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] afs: proc cells and rootcell are writeable
Date
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.

diff --git a/fs/afs/proc.c b/fs/afs/proc.c
index 526e4bb..276cb6e 100644
--- a/fs/afs/proc.c
+++ b/fs/afs/proc.c
@@ -147,11 +147,11 @@ int afs_proc_init(void)
if (!proc_afs)
goto error_dir;

- p = proc_create("cells", 0, proc_afs, &afs_proc_cells_fops);
+ p = proc_create("cells", S_IFREG | S_IRUGO | S_IWUSR, proc_afs, &afs_proc_cells_fops);
if (!p)
goto error_cells;

- p = proc_create("rootcell", 0, proc_afs, &afs_proc_rootcell_fops);
+ p = proc_create("rootcell", S_IFREG | S_IRUGO | S_IWUSR, proc_afs, &afs_proc_rootcell_fops);
if (!p)
goto error_rootcell;

--
Pali Rohár
pali.rohar@gmail.com[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-11-20 15:01    [W:0.076 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site