afs: proc cells and rootcell are writeable
PATCH 1/1 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.
fs/afs/proc.c +2 -2
@@ -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;
Signature · 2 lines
Pali Rohár [email protected]
Quoted 12 lines · On Wednesday 20 November 2013 14:30:55 Pali Rohár wrote:
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.
fs/afs/proc.c +0
-0@@ -147,11 +147,11 @@ int afs_proc_init(void)if (!proc_afs) goto error_dir;
fs/afs/proc.c int afs_proc_init(void) · line 156
Quoted 10 lines
fs/afs/proc.c +1
-2- 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;
Hello, can somebody review my patch?
Signature · 2 lines
Pali Rohár [email protected]
Quoted 11 lines · On Wed, 20 Nov 2013 14:30:55 +0100 Pali Roh__r <[email protected]> wrote:
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.
fs/afs/proc.c +0
-0@@ -147,11 +147,11 @@ int afs_proc_init(void)if (!proc_afs) goto error_dir;
fs/afs/proc.c int afs_proc_init(void) · line 156
Quoted 10 lines
fs/afs/proc.c +2
-2- 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;
Please send a signed-off-by: for this, as perDocumentation/SubmittingPatches, section 12.
David ack?
Quoted 1 line · On Monday 16 December 2013 08:00:04 Andrew Morton wrote:
On Wed, 20 Nov 2013 14:30:55 +0100 Pali
Roh__r
Quoted 27 lines · <[email protected]> wrote:
Quoted 27 lines
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.
fs/afs/proc.c +0
-1@@ -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);fs/afs/proc.c +0
-1if (!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);
Quoted 8 lines
fs/afs/proc.c int afs_proc_init(void) · line 156
Quoted 3 lines
fs/afs/proc.c +0
-0if (!p) goto error_rootcell;Please send a signed-off-by: for this, as per
Documentation/SubmittingPatches, section 12.David ack?
Sorry, I forgot to add Signed-off-by. Here it is:
Signature · 2 lines
Pali Rohár [email protected]
David Howells
maintainerQuoted 1 line · Andrew Morton
David ack?
I've signed it off and added here:
http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/commit/?h=afs&id=8de69dbba9012693d4f9e7a7e3c12a0b467f85f3
David
Quoted 9 lines · On Tuesday 17 December 2013 19:31:05 David Howells wrote:
Quoted 1 line · Andrew Morton
David ack?
I've signed it off and added here:
http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs
.git/commit/?h=afs&id=8de69dbba9012693d4f9e7a7e3c12a0b467f85f3David
Can you propose this patch also for stable branches? 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...
Signature · 2 lines
Pali Rohár [email protected]