lkml.org 
[lkml]   [2011]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[34-longterm 082/209] USB: misc: usbled: fix up some sysfs attribute permissions
    Date
    From: Greg Kroah-Hartman <gregkh@suse.de>

    =====================================================================
    | This is a commit scheduled for the next v2.6.34 longterm release. |
    | If you see a problem with using this for longterm, please comment.|
    =====================================================================

    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>
    Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
    ---
    drivers/usb/misc/usbled.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/drivers/usb/misc/usbled.c b/drivers/usb/misc/usbled.c
    index 63da2c3..c96f51d 100644
    --- 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_IWUGO | S_IRUGO, show_##value, set_##value);
    +static DEVICE_ATTR(value, S_IRUGO | S_IWUSR, show_##value, set_##value);
    show_set(blue);
    show_set(red);
    show_set(green);
    --
    1.7.4.4


    \
     
     \ /
      Last update: 2011-04-14 20:03    [W:4.026 / U:0.420 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site