提交 71b3e938 编写于 作者: D Daniel Kurtz 提交者: 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: NDaniel Kurtz <djkurtz@chromium.org>
Reviewed-by: NJoonyoung Shim <jy0922.shim@samsung.com>
Acked-by: NNick Dyer <nick.dyer@itdev.co.uk>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 3a73c816
......@@ -1049,8 +1049,8 @@ static ssize_t mxt_update_fw_store(struct device *dev,
return count;
}
static DEVICE_ATTR(object, 0444, mxt_object_show, NULL);
static DEVICE_ATTR(update_fw, 0664, NULL, mxt_update_fw_store);
static DEVICE_ATTR(object, S_IRUGO, mxt_object_show, NULL);
static DEVICE_ATTR(update_fw, S_IWUSR, NULL, mxt_update_fw_store);
static struct attribute *mxt_attrs[] = {
&dev_attr_object.attr,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册