Commit 92d191de authored by Vasiliy Kulikov's avatar Vasiliy Kulikov Committed by Greg Kroah-Hartman

drivers/rtc/rtc-ds1511.c: world-writable sysfs nvram file

commit 49d50fb1 upstream.

Don't allow everybogy to write to NVRAM.
Signed-off-by: default avatarVasiliy Kulikov <segoon@openwall.com>
Cc: Andy Sharp <andy.sharp@onstor.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 23b37e1e
...@@ -480,7 +480,7 @@ ds1511_nvram_write(struct kobject *kobj, struct bin_attribute *bin_attr, ...@@ -480,7 +480,7 @@ ds1511_nvram_write(struct kobject *kobj, struct bin_attribute *bin_attr,
static struct bin_attribute ds1511_nvram_attr = { static struct bin_attribute ds1511_nvram_attr = {
.attr = { .attr = {
.name = "nvram", .name = "nvram",
.mode = S_IRUGO | S_IWUGO, .mode = S_IRUGO | S_IWUSR,
}, },
.size = DS1511_RAM_MAX, .size = DS1511_RAM_MAX,
.read = ds1511_nvram_read, .read = ds1511_nvram_read,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment