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 13/20] net: can: janz-ican3: world-writable sysfs termination file
    Date
    Don't allow everybody to set terminator via sysfs.

    Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
    ---
    Compile tested only.

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

    diff --git a/drivers/net/can/janz-ican3.c b/drivers/net/can/janz-ican3.c
    index b9a6d7a..366f5cc 100644
    --- a/drivers/net/can/janz-ican3.c
    +++ b/drivers/net/can/janz-ican3.c
    @@ -1618,7 +1618,7 @@ static ssize_t ican3_sysfs_set_term(struct device *dev,
    return count;
    }

    -static DEVICE_ATTR(termination, S_IWUGO | S_IRUGO, ican3_sysfs_show_term,
    +static DEVICE_ATTR(termination, S_IWUSR | S_IRUGO, ican3_sysfs_show_term,
    ican3_sysfs_set_term);

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


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