]> git.hungrycats.org Git - linux/commitdiff
net: can: janz-ican3: world-writable sysfs termination file
authorVasiliy Kulikov <segoon@openwall.com>
Fri, 4 Feb 2011 02:23:53 +0000 (02:23 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 24 Feb 2011 22:54:41 +0000 (14:54 -0800)
commit 1e6d93e45b231b3ae87c01902ede2315aacfe976 upstream.

Don't allow everybody to set terminator via sysfs.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/can/janz-ican3.c

index 6e533dcc36c0d64292b94330b7fe2cb3898c4a6a..e733f2c56a9f17234c3f94466a0b68a28e2ae22e 100644 (file)
@@ -1627,7 +1627,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[] = {