aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2014-05-13 21:03:47 -0400
committerRusty Russell <rusty@rustcorp.com.au>2014-05-13 21:23:53 -0400
commit993bcc62ce4437c5b46f503981cd5057ae90c008 (patch)
tree621ca5bcfb413fdc0b0bc4eeae0d28e8351dd374
parent7a6fed15f8136f5c02e488c647743a7090746721 (diff)
drivers/mtd/devices/docg3.c: 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: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r--drivers/mtd/devices/docg3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c
index dd5e1018d37b..91a169c44b39 100644
--- a/drivers/mtd/devices/docg3.c
+++ b/drivers/mtd/devices/docg3.c
@@ -1608,8 +1608,8 @@ static ssize_t dps1_insert_key(struct device *dev,
1608#define FLOOR_SYSFS(id) { \ 1608#define FLOOR_SYSFS(id) { \
1609 __ATTR(f##id##_dps0_is_keylocked, S_IRUGO, dps0_is_key_locked, NULL), \ 1609 __ATTR(f##id##_dps0_is_keylocked, S_IRUGO, dps0_is_key_locked, NULL), \
1610 __ATTR(f##id##_dps1_is_keylocked, S_IRUGO, dps1_is_key_locked, NULL), \ 1610 __ATTR(f##id##_dps1_is_keylocked, S_IRUGO, dps1_is_key_locked, NULL), \
1611 __ATTR(f##id##_dps0_protection_key, S_IWUGO, NULL, dps0_insert_key), \ 1611 __ATTR(f##id##_dps0_protection_key, S_IWUSR|S_IWGRP, NULL, dps0_insert_key), \
1612 __ATTR(f##id##_dps1_protection_key, S_IWUGO, NULL, dps1_insert_key), \ 1612 __ATTR(f##id##_dps1_protection_key, S_IWUSR|S_IWGRP, NULL, dps1_insert_key), \
1613} 1613}
1614 1614
1615static struct device_attribute doc_sys_attrs[DOC_MAX_NBFLOORS][4] = { 1615static struct device_attribute doc_sys_attrs[DOC_MAX_NBFLOORS][4] = {