summaryrefslogtreecommitdiff
path: root/drivers/w1
diff options
context:
space:
mode:
authorBrian Swetland <swetland@google.com>2009-11-23 06:41:42 -0800
committerColin Cross <ccross@android.com>2010-09-29 17:49:05 -0700
commita2ff915ea6fdf82db131dc31da5fad2c262c0c9d (patch)
tree6d3a231a2effe2f2ec3d9edda2e588a425f4d0d2 /drivers/w1
parent1cc8f1e3f421e369612538b08d574f7317bf6631 (diff)
w1: don't allow arbitrary users to remove w1 devices
The search/pullup/add/remove device attributes were 0666 which would allow arbitrary users to affect the 1 wire bus. Change to 0664 to prevent that. Signed-off-by: Brian Swetland <swetland@google.com>
Diffstat (limited to 'drivers/w1')
-rw-r--r--drivers/w1/w1.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index 2839e281cd65..b7b5014ff714 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -517,10 +517,10 @@ static W1_MASTER_ATTR_RO(max_slave_count, S_IRUGO);
static W1_MASTER_ATTR_RO(attempts, S_IRUGO);
static W1_MASTER_ATTR_RO(timeout, S_IRUGO);
static W1_MASTER_ATTR_RO(pointer, S_IRUGO);
-static W1_MASTER_ATTR_RW(search, S_IRUGO | S_IWUGO);
-static W1_MASTER_ATTR_RW(pullup, S_IRUGO | S_IWUGO);
-static W1_MASTER_ATTR_RW(add, S_IRUGO | S_IWUGO);
-static W1_MASTER_ATTR_RW(remove, S_IRUGO | S_IWUGO);
+static W1_MASTER_ATTR_RW(search, S_IRUGO | S_IWUSR | S_IWGRP);
+static W1_MASTER_ATTR_RW(pullup, S_IRUGO | S_IWUSR | S_IWGRP);
+static W1_MASTER_ATTR_RW(add, S_IRUGO | S_IWUSR | S_IWGRP);
+static W1_MASTER_ATTR_RW(remove, S_IRUGO | S_IWUSR | S_IWGRP);
static struct attribute *w1_master_default_attrs[] = {
&w1_master_attribute_name.attr,