]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drivers/rtc/rtc-ds1511.c: world-writable sysfs nvram file
authorVasiliy Kulikov <segoon@openwall.com>
Tue, 22 Mar 2011 23:34:53 +0000 (16:34 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 14 Apr 2011 23:53:37 +0000 (16:53 -0700)
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>
drivers/rtc/rtc-ds1511.c

index 0b6b7730c716ba19187607253fc782f7daa3f321..21c2181bdf065b8f25e625389ebd0c6253a9dbbd 100644 (file)
@@ -480,7 +480,7 @@ ds1511_nvram_write(struct kobject *kobj, struct bin_attribute *bin_attr,
 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,