Commit 66dca9b8 authored by Joe Malicki's avatar Joe Malicki Committed by James Bottomley

[SCSI] megaraid_sas: remove sysfs dbg_lvl world writeable permissions

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

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

[jejb: fix up rejections]
Signed-off-by: default avatarJoseph Malicki <jmalicki@metacarta.com>
Acked-by: default avatar"Yang, Bo" <Bo.Yang@lsi.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent bcd2361d
......@@ -3405,7 +3405,7 @@ megasas_sysfs_set_dbg_lvl(struct device_driver *dd, const char *buf, size_t coun
return retval;
}
static DRIVER_ATTR(dbg_lvl, S_IRUGO|S_IWUGO, megasas_sysfs_show_dbg_lvl,
static DRIVER_ATTR(dbg_lvl, S_IRUGO|S_IWUSR, megasas_sysfs_show_dbg_lvl,
megasas_sysfs_set_dbg_lvl);
static ssize_t
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment