lkml.org 
[lkml]   [2012]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[34-longterm 043/196] drivers/misc/ep93xx_pwm.c: world-writable sysfs files
    Date
    From: Vasiliy Kulikov <segoon@openwall.com>

    -------------------
    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 deb187e72470b0382d4f0cb859e76e1ebc3a1082 upstream.

    Don't allow everybody to change device settings.

    Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
    Acked-by: Hartley Sweeten <hartleys@visionengravers.com>
    Cc: Matthieu Crapet <mcrapet@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
    ---
    drivers/misc/ep93xx_pwm.c | 6 +++---
    1 file changed, 3 insertions(+), 3 deletions(-)

    diff --git a/drivers/misc/ep93xx_pwm.c b/drivers/misc/ep93xx_pwm.c
    index 46b3439..16d7179 100644
    --- a/drivers/misc/ep93xx_pwm.c
    +++ b/drivers/misc/ep93xx_pwm.c
    @@ -249,11 +249,11 @@ static ssize_t ep93xx_pwm_set_invert(struct device *dev,

    static DEVICE_ATTR(min_freq, S_IRUGO, ep93xx_pwm_get_min_freq, NULL);
    static DEVICE_ATTR(max_freq, S_IRUGO, ep93xx_pwm_get_max_freq, NULL);
    -static DEVICE_ATTR(freq, S_IWUGO | S_IRUGO,
    +static DEVICE_ATTR(freq, S_IWUSR | S_IRUGO,
    ep93xx_pwm_get_freq, ep93xx_pwm_set_freq);
    -static DEVICE_ATTR(duty_percent, S_IWUGO | S_IRUGO,
    +static DEVICE_ATTR(duty_percent, S_IWUSR | S_IRUGO,
    ep93xx_pwm_get_duty_percent, ep93xx_pwm_set_duty_percent);
    -static DEVICE_ATTR(invert, S_IWUGO | S_IRUGO,
    +static DEVICE_ATTR(invert, S_IWUSR | S_IRUGO,
    ep93xx_pwm_get_invert, ep93xx_pwm_set_invert);

    static struct attribute *ep93xx_pwm_attrs[] = {
    --
    1.7.9.3


    \
     
     \ /
      Last update: 2012-03-13 01:37    [W:4.129 / U:0.452 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site