Skip to content

Commit

Permalink
HID: prodikeys: make sysfs permissions more strict
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Kosina committed Nov 18, 2010
1 parent e9229fa commit c311598
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/hid/hid-prodikeys.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static ssize_t store_channel(struct device *dev,
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);

static struct device_attribute *sysfs_device_attr_channel = {
Expand Down Expand Up @@ -169,7 +169,7 @@ static ssize_t store_sustain(struct device *dev,
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);

static struct device_attribute *sysfs_device_attr_sustain = {
Expand Down Expand Up @@ -207,7 +207,7 @@ static ssize_t store_octave(struct device *dev,
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);

static struct device_attribute *sysfs_device_attr_octave = {
Expand Down

0 comments on commit c311598

Please sign in to comment.