megaraid_sas: remove sysfs poll_mode_io world writeable permissions

commit bb7d3f24c7 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>
This commit is contained in:
Bryn M. Reeves 2009-11-12 18:31:54 +00:00 committed by Greg Kroah-Hartman
parent 2db740cb36
commit 94249e6037

View File

@ -3451,7 +3451,7 @@ megasas_sysfs_set_poll_mode_io(struct device_driver *dd,
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);