X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=net%2Fcore%2Fwireless.c;h=d2bc72d318f7bdb41dc4ab9c1ab3c08978c5af4e;hb=4d3ce21fa9d2eaeda113aa2f9c2da80d972bef64;hp=81d6995fcfdb30bd684b839626a0145fd079bd31;hpb=63e8d9114dab88c101be2372cb1f83a4fe74d9c1;p=linux-2.6-omap-h63xx.git diff --git a/net/core/wireless.c b/net/core/wireless.c index 81d6995fcfd..d2bc72d318f 100644 --- a/net/core/wireless.c +++ b/net/core/wireless.c @@ -1726,6 +1726,14 @@ int wireless_rtnetlink_get(struct net_device * dev, if(!IW_IS_GET(request->cmd)) return -EOPNOTSUPP; + /* If command is `get the encoding parameters', check if + * the user has the right to do it */ + if (request->cmd == SIOCGIWENCODE || + request->cmd == SIOCGIWENCODEEXT) { + if (!capable(CAP_NET_ADMIN)) + return -EPERM; + } + /* Special cases */ if(request->cmd == SIOCGIWSTATS) /* Get Wireless Stats */