projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c4cb3c
)
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>
Thu, 9 Dec 2010 21:33:08 +0000
(13:33 -0800)
commit
48f115470e68d443436b76b22dad63ffbffd6b97
upstream.
They should not be writable by any user.
Reported-by: Linus Torvalds <torvalds@linux-foundation.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 63da2c3c838fd0b6495d0429a870e3b1e035e9dd..c96f51de1696581faba425fb29db3a18f9ef1458 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);