From: Vasiliy Kulikov Date: Tue, 22 Mar 2011 23:34:53 +0000 (-0700) Subject: drivers/rtc/rtc-ds1511.c: world-writable sysfs nvram file X-Git-Tag: v2.6.34.11~156 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dc19bd129ebe219f75e6f6a7a78f6eb6f82d1e6d;p=thirdparty%2Fkernel%2Fstable.git 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 Cc: Andy Sharp Cc: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Paul Gortmaker --- diff --git a/drivers/rtc/rtc-ds1511.c b/drivers/rtc/rtc-ds1511.c index 06b8566c4532e..fad05bd17ca9d 100644 --- a/drivers/rtc/rtc-ds1511.c +++ b/drivers/rtc/rtc-ds1511.c @@ -483,7 +483,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,