diff options
author | Or Gerlitz <ogerlitz@voltaire.com> | 2010-06-06 00:59:16 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2010-07-06 17:23:22 -0400 |
commit | 7a52b34b07122ff5f45258d47f260f8a525518f0 (patch) | |
tree | 4617ecc36b53119ffec8563005e7aa1195d9fad7 /drivers | |
parent | 67a3e12b05e055c0415c556a315a3d3eb637e29e (diff) |
IPoIB: Fix world-writable child interface control sysfs attributes
Sumeet Lahorani <sumeet.lahorani@oracle.com> reported that the IPoIB
child entries are world-writable; however we don't want ordinary users
to be able to create and destroy child interfaces, so fix them to be
writable only by root.
Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
Cc: <stable@kernel.org>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index df3eb8c9fd96..b4b22576f12a 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c | |||
@@ -1163,7 +1163,7 @@ static ssize_t create_child(struct device *dev, | |||
1163 | 1163 | ||
1164 | return ret ? ret : count; | 1164 | return ret ? ret : count; |
1165 | } | 1165 | } |
1166 | static DEVICE_ATTR(create_child, S_IWUGO, NULL, create_child); | 1166 | static DEVICE_ATTR(create_child, S_IWUSR, NULL, create_child); |
1167 | 1167 | ||
1168 | static ssize_t delete_child(struct device *dev, | 1168 | static ssize_t delete_child(struct device *dev, |
1169 | struct device_attribute *attr, | 1169 | struct device_attribute *attr, |
@@ -1183,7 +1183,7 @@ static ssize_t delete_child(struct device *dev, | |||
1183 | return ret ? ret : count; | 1183 | return ret ? ret : count; |
1184 | 1184 | ||
1185 | } | 1185 | } |
1186 | static DEVICE_ATTR(delete_child, S_IWUGO, NULL, delete_child); | 1186 | static DEVICE_ATTR(delete_child, S_IWUSR, NULL, delete_child); |
1187 | 1187 | ||
1188 | int ipoib_add_pkey_attr(struct net_device *dev) | 1188 | int ipoib_add_pkey_attr(struct net_device *dev) |
1189 | { | 1189 | { |