提交 66dca9b8 编写于 作者: J Joe Malicki 提交者: 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: NJoseph Malicki <jmalicki@metacarta.com>
Acked-by: N"Yang, Bo" <Bo.Yang@lsi.com>
Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册