]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
.27 patch
authorGreg Kroah-Hartman <gregkh@suse.de>
Wed, 28 Jul 2010 22:20:20 +0000 (15:20 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 28 Jul 2010 22:20:20 +0000 (15:20 -0700)
queue-2.6.27/ipoib-fix-world-writable-child-interface-control-sysfs-attributes.patch [new file with mode: 0644]
queue-2.6.27/series

diff --git a/queue-2.6.27/ipoib-fix-world-writable-child-interface-control-sysfs-attributes.patch b/queue-2.6.27/ipoib-fix-world-writable-child-interface-control-sysfs-attributes.patch
new file mode 100644 (file)
index 0000000..2c2dc6f
--- /dev/null
@@ -0,0 +1,42 @@
+From 7a52b34b07122ff5f45258d47f260f8a525518f0 Mon Sep 17 00:00:00 2001
+From: Or Gerlitz <ogerlitz@voltaire.com>
+Date: Sun, 6 Jun 2010 04:59:16 +0000
+Subject: IPoIB: Fix world-writable child interface control sysfs attributes
+
+From: Or Gerlitz <ogerlitz@voltaire.com>
+
+commit 7a52b34b07122ff5f45258d47f260f8a525518f0 upstream.
+
+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>
+Signed-off-by: Roland Dreier <rolandd@cisco.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/infiniband/ulp/ipoib/ipoib_main.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
++++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
+@@ -1158,7 +1158,7 @@ static ssize_t create_child(struct devic
+       return ret ? ret : count;
+ }
+-static DEVICE_ATTR(create_child, S_IWUGO, NULL, create_child);
++static DEVICE_ATTR(create_child, S_IWUSR, NULL, create_child);
+ static ssize_t delete_child(struct device *dev,
+                           struct device_attribute *attr,
+@@ -1178,7 +1178,7 @@ static ssize_t delete_child(struct devic
+       return ret ? ret : count;
+ }
+-static DEVICE_ATTR(delete_child, S_IWUGO, NULL, delete_child);
++static DEVICE_ATTR(delete_child, S_IWUSR, NULL, delete_child);
+ int ipoib_add_pkey_attr(struct net_device *dev)
+ {
index 36dfac8b2e6f0ed29ae17220b4a34d1ed37e5b9b..ebe664c91544e45a4347275f3deeee7c0b0ee5d3 100644 (file)
@@ -11,3 +11,4 @@ scsi-aacraid-eliminate-use-after-free.patch
 amd64-agp-probe-unknown-agp-devices-the-right-way.patch
 x86-calgary-increase-max-phb-number.patch
 x86-calgary-limit-the-max-phb-number-to-256.patch
+ipoib-fix-world-writable-child-interface-control-sysfs-attributes.patch