projects
/
profile
/
common
/
kernel-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d489a4b
)
USB: misc: usbled: fix up some sysfs attribute permissions
author
Greg Kroah-Hartman
<gregkh@suse.de>
Mon, 15 Nov 2010 19:35:49 +0000
(11:35 -0800)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Mon, 15 Nov 2010 22:04:15 +0000
(14:04 -0800)
They should not be writable by any user.
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/misc/usbled.c
patch
|
blob
|
history
diff --git
a/drivers/usb/misc/usbled.c
b/drivers/usb/misc/usbled.c
index
63da2c3
..
c96f51d
100644
(file)
--- a/
drivers/usb/misc/usbled.c
+++ b/
drivers/usb/misc/usbled.c
@@
-94,7
+94,7
@@
static ssize_t set_##value(struct device *dev, struct device_attribute *attr, co
change_color(led); \
return count; \
} \
-static DEVICE_ATTR(value, S_I
WUGO | S_IRUGO
, show_##value, set_##value);
+static DEVICE_ATTR(value, S_I
RUGO | S_IWUSR
, show_##value, set_##value);
show_set(blue);
show_set(red);
show_set(green);