lkml.org 
[lkml]   [2011]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 12/20] net: can: at91_can: world-writable sysfs files
    Date
    Don't allow everybody to write to mb0_id file.

    Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
    ---
    Cannot compile the driver, so it is not tested at all.

    drivers/net/can/at91_can.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c
    index 2532b96..57d2ffb 100644
    --- a/drivers/net/can/at91_can.c
    +++ b/drivers/net/can/at91_can.c
    @@ -1109,7 +1109,7 @@ static ssize_t at91_sysfs_set_mb0_id(struct device *dev,
    return ret;
    }

    -static DEVICE_ATTR(mb0_id, S_IWUGO | S_IRUGO,
    +static DEVICE_ATTR(mb0_id, S_IWUSR | S_IRUGO,
    at91_sysfs_show_mb0_id, at91_sysfs_set_mb0_id);

    static struct attribute *at91_sysfs_attrs[] = {
    --
    1.7.0.4


    \
     
     \ /
      Last update: 2011-02-04 13:29    [W:0.020 / U:92.764 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site