]> err.no Git - linux-2.6/commitdiff
IPoIB: Only allow root to change between datagram and connected mode
authorRoland Dreier <rolandd@cisco.com>
Fri, 16 Feb 2007 21:57:33 +0000 (13:57 -0800)
committerRoland Dreier <rolandd@cisco.com>
Fri, 16 Feb 2007 21:57:33 +0000 (13:57 -0800)
Change the permissions of the "mode" sysfs attribute to be S_IWUSR
instead of S_IWUGO.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/ulp/ipoib/ipoib_cm.c

index 2d483874a58909ca77d359c1d201067dea7cb450..8881a717e9da6df753e9e0c9e8db256dbe464e35 100644 (file)
@@ -1138,7 +1138,7 @@ static ssize_t set_mode(struct device *d, struct device_attribute *attr,
        return -EINVAL;
 }
 
-static DEVICE_ATTR(mode, S_IWUGO | S_IRUGO, show_mode, set_mode);
+static DEVICE_ATTR(mode, S_IWUSR | S_IRUGO, show_mode, set_mode);
 
 int ipoib_cm_add_mode_attr(struct net_device *dev)
 {