24 lines
711 B
Diff
24 lines
711 B
Diff
Based on:
|
|
|
|
From: Bryn M. Reeves <bmr@redhat.com>
|
|
Subject: [PATCH] [SCSI] megaraid_sas: remove sysfs poll_mode_io world writeable permissions
|
|
|
|
/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.
|
|
|
|
--- a/drivers/scsi/megaraid/megaraid_sas.c
|
|
+++ b/drivers/scsi/megaraid/megaraid_sas.c
|
|
@@ -3451,7 +3451,7 @@
|
|
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);
|
|
|