]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
platform: x86: acer-wmi: world-writable sysfs threeg file
authorVasiliy Kulikov <segoon@openwall.com>
Fri, 4 Feb 2011 12:23:56 +0000 (15:23 +0300)
committerWilly Tarreau <w@1wt.eu>
Sat, 30 Apr 2011 14:53:07 +0000 (16:53 +0200)
commit b80b168f918bba4b847e884492415546b340e19d upstream.

Don't allow everybody to write to hardware registers.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
[wt: also fixed permission on interface]

drivers/misc/acer-wmi.c

index d8b0d326e4522232fbcc1455dce67fb3e207c059..aca21f7fe9a262ca7b9989ce930b5194388061be 100644 (file)
@@ -957,7 +957,7 @@ set_bool_##value(struct device *dev, struct device_attribute *attr, \
                        return -EINVAL; \
        return count; \
 } \
-static DEVICE_ATTR(value, S_IWUGO | S_IRUGO | S_IWUSR, \
+static DEVICE_ATTR(value, S_IRUGO | S_IWUSR, \
        show_bool_##value, set_bool_##value);
 
 show_set_bool(wireless, ACER_CAP_WIRELESS);
@@ -982,7 +982,7 @@ static ssize_t show_interface(struct device *dev, struct device_attribute *attr,
        }
 }
 
-static DEVICE_ATTR(interface, S_IWUGO | S_IRUGO | S_IWUSR,
+static DEVICE_ATTR(interface, S_IRUGO | S_IWUSR,
        show_interface, NULL);
 
 /*