diff options
author | Jiri Kosina <jkosina@suse.cz> | 2010-11-18 10:27:07 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-11-18 10:30:34 -0500 |
commit | c311598b29f09c5092747a2603700f96a7daec2a (patch) | |
tree | 3721fd171cd595176a60de47873290ae3ac251bb /drivers/hid | |
parent | e9229faf920aba47dd1ba6940b3ca138024543d3 (diff) |
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: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-prodikeys.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hid/hid-prodikeys.c b/drivers/hid/hid-prodikeys.c index 48eab84f53b5..5f0fa6c1bf87 100644 --- a/drivers/hid/hid-prodikeys.c +++ b/drivers/hid/hid-prodikeys.c | |||
@@ -130,7 +130,7 @@ static ssize_t store_channel(struct device *dev, | |||
130 | return -EINVAL; | 130 | return -EINVAL; |
131 | } | 131 | } |
132 | 132 | ||
133 | static DEVICE_ATTR(channel, S_IRUGO | S_IWUGO, show_channel, | 133 | static DEVICE_ATTR(channel, S_IRUGO | S_IWUSR | S_IWGRP , show_channel, |
134 | store_channel); | 134 | store_channel); |
135 | 135 | ||
136 | static struct device_attribute *sysfs_device_attr_channel = { | 136 | static struct device_attribute *sysfs_device_attr_channel = { |
@@ -169,7 +169,7 @@ static ssize_t store_sustain(struct device *dev, | |||
169 | return -EINVAL; | 169 | return -EINVAL; |
170 | } | 170 | } |
171 | 171 | ||
172 | static DEVICE_ATTR(sustain, S_IRUGO | S_IWUGO, show_sustain, | 172 | static DEVICE_ATTR(sustain, S_IRUGO | S_IWUSR | S_IWGRP, show_sustain, |
173 | store_sustain); | 173 | store_sustain); |
174 | 174 | ||
175 | static struct device_attribute *sysfs_device_attr_sustain = { | 175 | static struct device_attribute *sysfs_device_attr_sustain = { |
@@ -207,7 +207,7 @@ static ssize_t store_octave(struct device *dev, | |||
207 | return -EINVAL; | 207 | return -EINVAL; |
208 | } | 208 | } |
209 | 209 | ||
210 | static DEVICE_ATTR(octave, S_IRUGO | S_IWUGO, show_octave, | 210 | static DEVICE_ATTR(octave, S_IRUGO | S_IWUSR | S_IWGRP, show_octave, |
211 | store_octave); | 211 | store_octave); |
212 | 212 | ||
213 | static struct device_attribute *sysfs_device_attr_octave = { | 213 | static struct device_attribute *sysfs_device_attr_octave = { |