From patchwork Fri Feb 4 12:24:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [17/20] rtc: rtc-ds1511: world-writable sysfs nvram file Date: Fri, 04 Feb 2011 02:24:06 -0000 From: Vasiliy Kulikov X-Patchwork-Id: 81852 Message-Id: <48f518983fa454135d7cfadef120edab35c94329.1296818921.git.segoon@openwall.com> To: linux-kernel@vger.kernel.org Cc: security@kernel.org, Alessandro Zummo , rtc-linux@googlegroups.com Don't allow everybogy to write to NVRAM. Signed-off-by: Vasiliy Kulikov --- Compile tested only. drivers/rtc/rtc-ds1511.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/rtc/rtc-ds1511.c b/drivers/rtc/rtc-ds1511.c index 37268e9..afeb546 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,