megaraid_sas dbg_lvl permissions
A message that is not in the archive (sent off-list or not yet received): 25702243.1118401218748366053.JavaMail.root@ouachita
/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.
--
scsi/megaraid/megaraid_sas.c renamed from scsi/megaraid/megaraid_sas.c.orig +1 -1
@@ -3044,7 +3044,7 @@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);/**
--
ACK.
Thanks,
Bo Yang
-----Original Message-----
From: Joe Malicki [mailto:[email protected]]
Sent: Thursday, August 14, 2008 5:15 PM
To: Yang, Bo
Cc: [email protected]
Subject: megaraid_sas dbg_lvl 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.
--
scsi/megaraid/megaraid_sas.c 2008-01-31 10:52:10.000000000 -0500 renamed from scsi/megaraid/megaraid_sas.c.orig 2008-01-31 10:49:57.000000000 -0500 +2 -1
@@ -3044,7 +3044,7 @@ 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);
/**
--