Commit 71b3e938 authored by Daniel Kurtz's avatar Daniel Kurtz Committed by Dmitry Torokhov

Input: atmel_mxt_ts - only allow root to update firmware

Restrict permissions on the update_fw sysfs entry to read only for root
only.

Also, update object permission to use a macro S_IRUGO macro instead of
hard coded 0444.
Signed-off-by: default avatarDaniel Kurtz <djkurtz@chromium.org>
Reviewed-by: default avatarJoonyoung Shim <jy0922.shim@samsung.com>
Acked-by: default avatarNick Dyer <nick.dyer@itdev.co.uk>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 3a73c816
...@@ -1049,8 +1049,8 @@ static ssize_t mxt_update_fw_store(struct device *dev, ...@@ -1049,8 +1049,8 @@ static ssize_t mxt_update_fw_store(struct device *dev,
return count; return count;
} }
static DEVICE_ATTR(object, 0444, mxt_object_show, NULL); static DEVICE_ATTR(object, S_IRUGO, mxt_object_show, NULL);
static DEVICE_ATTR(update_fw, 0664, NULL, mxt_update_fw_store); static DEVICE_ATTR(update_fw, S_IWUSR, NULL, mxt_update_fw_store);
static struct attribute *mxt_attrs[] = { static struct attribute *mxt_attrs[] = {
&dev_attr_object.attr, &dev_attr_object.attr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment