aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorVasiliy Kulikov <segoon@openwall.com>2011-02-04 15:23:56 +0300
committerWilly Tarreau <w@1wt.eu>2011-04-30 16:53:07 +0200
commit166e7fface1b580cffb17363eab47d59e4d07147 (patch)
treed7226d71a1ba0dc84bd32dcaaee3beef55ab05a6 /drivers
parentad2696852ffe240fbe4d88cbfd9e1ee890cff7aa (diff)
platform: x86: acer-wmi: world-writable sysfs threeg file
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]
Diffstat (limited to 'drivers')
-rw-r--r--drivers/misc/acer-wmi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/acer-wmi.c b/drivers/misc/acer-wmi.c
index d8b0d326e45..aca21f7fe9a 100644
--- a/drivers/misc/acer-wmi.c
+++ b/drivers/misc/acer-wmi.c
@@ -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);
/*