aboutsummaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authorVasiliy Kulikov <segoon@openwall.com>2011-03-22 16:34:53 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-04-14 13:02:36 -0700
commit89371f01f085a0c9977417085427f080564f7b08 (patch)
treedd7df3dc6a941108d207f9887adc9e234a9dda90 /drivers/rtc
parent3e9b1b39e0a6a7bb012f2b7b4a7e7ae91bcf90ac (diff)
downloadlinux-2.6.38-lt-ux500-89371f01f085a0c9977417085427f080564f7b08.tar.gz
drivers/rtc/rtc-ds1511.c: world-writable sysfs nvram file
commit 49d50fb1c28738ef6bad0c2b87d5355a1653fed5 upstream. Don't allow everybogy to write to NVRAM. Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Cc: Andy Sharp <andy.sharp@onstor.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-ds1511.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-ds1511.c b/drivers/rtc/rtc-ds1511.c
index 37268e97de4..afeb5469708 100644
--- a/drivers/rtc/rtc-ds1511.c
+++ b/drivers/rtc/rtc-ds1511.c
@@ -485,7 +485,7 @@ ds1511_nvram_write(struct file *filp, struct kobject *kobj,
static struct bin_attribute ds1511_nvram_attr = {
.attr = {
.name = "nvram",
- .mode = S_IRUGO | S_IWUGO,
+ .mode = S_IRUGO | S_IWUSR,
},
.size = DS1511_RAM_MAX,
.read = ds1511_nvram_read,