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) |
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 83231a27ae02..3bad1afc89fa 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2698,7 +2698,8 @@ int dev_ioctl(unsigned int cmd, void __user *arg) | |||
2698 | /* If command is `set a parameter', or | 2698 | /* If command is `set a parameter', or |
2699 | * `get the encoding parameters', check if | 2699 | * `get the encoding parameters', check if |
2700 | * the user has the right to do it */ | 2700 | * the user has the right to do it */ |
2701 | if (IW_IS_SET(cmd) || cmd == SIOCGIWENCODE) { | 2701 | if (IW_IS_SET(cmd) || cmd == SIOCGIWENCODE |
2702 | || cmd == SIOCGIWENCODEEXT) { | ||
2702 | if (!capable(CAP_NET_ADMIN)) | 2703 | if (!capable(CAP_NET_ADMIN)) |
2703 | return -EPERM; | 2704 | return -EPERM; |
2704 | } | 2705 | } |
diff --git a/net/core/wireless.c b/net/core/wireless.c index 81d6995fcfdb..d2bc72d318f7 100644 --- a/net/core/wireless.c +++ b/net/core/wireless.c | |||
@@ -1726,6 +1726,14 @@ int wireless_rtnetlink_get(struct net_device * dev, | |||
1726 | if(!IW_IS_GET(request->cmd)) | 1726 | if(!IW_IS_GET(request->cmd)) |
1727 | return -EOPNOTSUPP; | 1727 | return -EOPNOTSUPP; |
1728 | 1728 | ||
1729 | /* If command is `get the encoding parameters', check if | ||
1730 | * the user has the right to do it */ | ||
1731 | if (request->cmd == SIOCGIWENCODE || | ||
1732 | request->cmd == SIOCGIWENCODEEXT) { | ||
1733 | if (!capable(CAP_NET_ADMIN)) | ||
1734 | return -EPERM; | ||
1735 | } | ||
1736 | |||
1729 | /* Special cases */ | 1737 | /* Special cases */ |
1730 | if(request->cmd == SIOCGIWSTATS) | 1738 | if(request->cmd == SIOCGIWSTATS) |
1731 | /* Get Wireless Stats */ | 1739 | /* Get Wireless Stats */ |