]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] megaraid_sas: remove sysfs dbg_lvl world writeable permissions
authorJoe Malicki <jmalicki@metacarta.com>
Thu, 14 Aug 2008 21:14:48 +0000 (17:14 -0400)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Sat, 16 Aug 2008 15:32:24 +0000 (10:32 -0500)
/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>
drivers/scsi/megaraid/megaraid_sas.c

index 870dc1c6302f35c3bda80502a2067e53cd0b2ef1..97b763378e7dca9e8de4678eeb013f25ac2da185 100644 (file)
@@ -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