diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2014-05-14 03:03:49 +0200 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2014-05-14 03:23:55 +0200 |
commit | 71e06af26cb6ed93a58a8a835d0d70191d779343 (patch) | |
tree | e04269a69d977b0fd638429f4946ae8713c020b4 /drivers/regulator | |
parent | drivers/scsi/pm8001/pm8001_ctl.c: avoid world-writable sysfs files. (diff) | |
download | linux-71e06af26cb6ed93a58a8a835d0d70191d779343.tar.xz linux-71e06af26cb6ed93a58a8a835d0d70191d779343.zip |
drivers/regulator/virtual: avoid world-writable sysfs files.
In line with practice for module parameters, we're adding a build-time
check that sysfs files aren't world-writable.
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/virtual.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/regulator/virtual.c b/drivers/regulator/virtual.c index f53e78b9a84e..6ff95b045984 100644 --- a/drivers/regulator/virtual.c +++ b/drivers/regulator/virtual.c @@ -266,11 +266,11 @@ static ssize_t set_mode(struct device *dev, struct device_attribute *attr, return count; } -static DEVICE_ATTR(min_microvolts, 0666, show_min_uV, set_min_uV); -static DEVICE_ATTR(max_microvolts, 0666, show_max_uV, set_max_uV); -static DEVICE_ATTR(min_microamps, 0666, show_min_uA, set_min_uA); -static DEVICE_ATTR(max_microamps, 0666, show_max_uA, set_max_uA); -static DEVICE_ATTR(mode, 0666, show_mode, set_mode); +static DEVICE_ATTR(min_microvolts, 0664, show_min_uV, set_min_uV); +static DEVICE_ATTR(max_microvolts, 0664, show_max_uV, set_max_uV); +static DEVICE_ATTR(min_microamps, 0664, show_min_uA, set_min_uA); +static DEVICE_ATTR(max_microamps, 0664, show_max_uA, set_max_uA); +static DEVICE_ATTR(mode, 0664, show_mode, set_mode); static struct attribute *regulator_virtual_attributes[] = { &dev_attr_min_microvolts.attr, |