[patch 1/1] afs: proc cells and rootcell are writeable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Pali Rohár <pali.rohar@xxxxxxxxx>
Subject: 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 it is not possible to write to cells and rootcell files
which means that it is not possible to add new servers to cells, so it is
not possible to access afs disks and afs driver is unusable.

Signed-off-by: Pali Rohr <pali.rohar@xxxxxxxxx>
Cc: David Howells <dhowells@xxxxxxxxxx>
Cc: <stable@xxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/afs/proc.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff -puN fs/afs/proc.c~afs-proc-cells-and-rootcell-are-writeable fs/afs/proc.c
--- a/fs/afs/proc.c~afs-proc-cells-and-rootcell-are-writeable
+++ a/fs/afs/proc.c
@@ -130,8 +130,10 @@ int afs_proc_init(void)
 	if (!proc_afs)
 		goto error_dir;
 
-	if (!proc_create("cells", 0, proc_afs, &afs_proc_cells_fops) ||
-	    !proc_create("rootcell", 0, proc_afs, &afs_proc_rootcell_fops))
+	if (!proc_create("cells", S_IFREG | S_IRUGO | S_IWUSR, proc_afs,
+			 &afs_proc_cells_fops) ||
+	    !proc_create("rootcell", S_IFREG | S_IRUGO | S_IWUSR, proc_afs,
+			 &afs_proc_rootcell_fops))
 		goto error_tree;
 
 	_leave(" = 0");
_
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]