提交 551fd612 编写于 作者: R Roland Dreier

IPoIB: Only allow root to change between datagram and connected mode

Change the permissions of the "mode" sysfs attribute to be S_IWUSR
instead of S_IWUGO.
Signed-off-by: NRoland Dreier <rolandd@cisco.com>
上级 11282b32
...@@ -1138,7 +1138,7 @@ static ssize_t set_mode(struct device *d, struct device_attribute *attr, ...@@ -1138,7 +1138,7 @@ static ssize_t set_mode(struct device *d, struct device_attribute *attr,
return -EINVAL; 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) int ipoib_cm_add_mode_attr(struct net_device *dev)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册