Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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