From: Jiri Kosina Date: Thu, 18 Nov 2010 15:28:43 +0000 (+0100) Subject: HID: wacom: make sysfs permissions more strict X-Git-Tag: v2.6.38-rc1~442^2~23 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=edd2126aa8aab8a87db7cc480d5047e9280d7acf;p=~shefty%2Frdma-dev.git HID: wacom: make sysfs permissions more strict 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 Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c index 724f46ed612..94caae73138 100644 --- a/drivers/hid/hid-wacom.c +++ b/drivers/hid/hid-wacom.c @@ -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,