]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
HID: wacom: make sysfs permissions more strict
authorJiri Kosina <jkosina@suse.cz>
Thu, 18 Nov 2010 15:28:43 +0000 (16:28 +0100)
committerJiri Kosina <jkosina@suse.cz>
Thu, 18 Nov 2010 15:30:52 +0000 (16:30 +0100)
It's not really dangerous in this driver, but it's against general
practice and worth fixing.

Wacom uses the attribute for changing the reporting speed of the
tablet (and this actually requires poking the device in the
background) (still I wouldn't consider it a security issue though).

udev is a proper place to handle this.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-wacom.c

index 724f46ed612f96320d2d24d60671c2bfa63b91c9..94caae73138168669ae372b342b0225d5cc3cac1 100644 (file)
@@ -172,7 +172,7 @@ static ssize_t wacom_store_speed(struct device *dev,
                return -EINVAL;
 }
 
-static DEVICE_ATTR(speed, S_IRUGO | S_IWUGO,
+static DEVICE_ATTR(speed, S_IRUGO | S_IWUSR | S_IWGRP,
                wacom_show_speed, wacom_store_speed);
 
 static int wacom_raw_event(struct hid_device *hdev, struct hid_report *report,