]> git.karo-electronics.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)
committerAndi Kleen <ak@linux.intel.com>
Thu, 28 Apr 2011 15:20:57 +0000 (08:20 -0700)
commit 49d50fb1c28738ef6bad0c2b87d5355a1653fed5 upstream.

Don't allow everybogy to write to NVRAM.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Andi Kleen <ak@linux.intel.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 37268e97de49e8f6d741dfd5e88271bb87f6566d..afeb5469708b8fb678cbd5a3136e23e8367d70b6 100644 (file)
@@ -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,