Commit c311598b authored by Jiri Kosina's avatar Jiri Kosina

HID: prodikeys: make sysfs permissions more strict

It's not really dangerous in this driver, but it's against general
practice and worth fixing.

Proper place for handling this correctly is udev.
Reported-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent e9229faf
...@@ -130,7 +130,7 @@ static ssize_t store_channel(struct device *dev, ...@@ -130,7 +130,7 @@ static ssize_t store_channel(struct device *dev,
return -EINVAL; return -EINVAL;
} }
static DEVICE_ATTR(channel, S_IRUGO | S_IWUGO, show_channel, static DEVICE_ATTR(channel, S_IRUGO | S_IWUSR | S_IWGRP , show_channel,
store_channel); store_channel);
static struct device_attribute *sysfs_device_attr_channel = { static struct device_attribute *sysfs_device_attr_channel = {
...@@ -169,7 +169,7 @@ static ssize_t store_sustain(struct device *dev, ...@@ -169,7 +169,7 @@ static ssize_t store_sustain(struct device *dev,
return -EINVAL; return -EINVAL;
} }
static DEVICE_ATTR(sustain, S_IRUGO | S_IWUGO, show_sustain, static DEVICE_ATTR(sustain, S_IRUGO | S_IWUSR | S_IWGRP, show_sustain,
store_sustain); store_sustain);
static struct device_attribute *sysfs_device_attr_sustain = { static struct device_attribute *sysfs_device_attr_sustain = {
...@@ -207,7 +207,7 @@ static ssize_t store_octave(struct device *dev, ...@@ -207,7 +207,7 @@ static ssize_t store_octave(struct device *dev,
return -EINVAL; return -EINVAL;
} }
static DEVICE_ATTR(octave, S_IRUGO | S_IWUGO, show_octave, static DEVICE_ATTR(octave, S_IRUGO | S_IWUSR | S_IWGRP, show_octave,
store_octave); store_octave);
static struct device_attribute *sysfs_device_attr_octave = { static struct device_attribute *sysfs_device_attr_octave = {
......
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