diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-04-20 17:36:10 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-04-20 17:36:10 -0400 |
commit | f18b95c3e2ab0f75b23a5aabab0bc8f99bd6bbf3 (patch) | |
tree | 9ff4b7efdb2ca1e83c2a413f06268b268098b3ca /net/core | |
parent | 17c281ab3e33be63693687d3db7ac9cf2bbdfd66 (diff) | |
parent | 848ef8555296f25d9226d3bc43ce4028835ed633 (diff) | |
download | op-kernel-dev-f18b95c3e2ab0f75b23a5aabab0bc8f99bd6bbf3.zip op-kernel-dev-f18b95c3e2ab0f75b23a5aabab0bc8f99bd6bbf3.tar.gz |
Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 3 | ||||
-rw-r--r-- | net/core/wireless.c | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 83231a2..3bad1af 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2698,7 +2698,8 @@ int dev_ioctl(unsigned int cmd, void __user *arg) /* If command is `set a parameter', or * `get the encoding parameters', check if * the user has the right to do it */ - if (IW_IS_SET(cmd) || cmd == SIOCGIWENCODE) { + if (IW_IS_SET(cmd) || cmd == SIOCGIWENCODE + || cmd == SIOCGIWENCODEEXT) { if (!capable(CAP_NET_ADMIN)) return -EPERM; } diff --git a/net/core/wireless.c b/net/core/wireless.c index 81d6995..d2bc72d 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 */ |