]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
megaraid_sas: remove sysfs poll_mode_io world writeable permissions
authorBryn M. Reeves <bmr@redhat.com>
Thu, 12 Nov 2009 18:31:54 +0000 (18:31 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 28 Jan 2010 23:20:12 +0000 (15:20 -0800)
commit bb7d3f24c71e528989501617651b669fbed798cb upstream.

/sys/bus/pci/drivers/megaraid_sas/poll_mode_io defaults to being
world-writable, which seems bad (letting any user affect kernel driver
behavior).

This turns off group and user write permissions, so that on typical
production systems only root can write to it.

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/scsi/megaraid/megaraid_sas.c

index 97b763378e7dca9e8de4678eeb013f25ac2da185..4c3f1247ebffbcccf963ad01d7f8e7aa9169db55 100644 (file)
@@ -3462,7 +3462,7 @@ out:
        return retval;
 }
 
-static DRIVER_ATTR(poll_mode_io, S_IRUGO|S_IWUGO,
+static DRIVER_ATTR(poll_mode_io, S_IRUGO|S_IWUSR,
                megasas_sysfs_show_poll_mode_io,
                megasas_sysfs_set_poll_mode_io);