Skip to content

Commit

Permalink
[SCSI] megaraid_sas: remove sysfs dbg_lvl world writeable permissions
Browse files Browse the repository at this point in the history
/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: Joseph Malicki <jmalicki@metacarta.com>
Acked-by: "Yang, Bo" <Bo.Yang@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
  • Loading branch information
Joe Malicki authored and James Bottomley committed Aug 16, 2008
1 parent bcd2361 commit 66dca9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/megaraid/megaraid_sas.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 66dca9b

Please sign in to comment.