]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
afs: proc cells and rootcell are writeable
authorPali Rohár <pali.rohar@gmail.com>
Fri, 3 Jan 2014 03:10:35 +0000 (14:10 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 3 Jan 2014 03:10:35 +0000 (14:10 +1100)
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.

Signed-off-by: Pali Rohr <pali.rohar@gmail.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/afs/proc.c

index 526e4bbbde59e4936f91367101adac8c7373053e..276cb6ed0b9343250639674fb67340eb8d516568 100644 (file)
@@ -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;