diff options
author | Uwe Stuehler <uwe@cvs.openbsd.org> | 2005-04-01 16:29:56 +0000 |
---|---|---|
committer | Uwe Stuehler <uwe@cvs.openbsd.org> | 2005-04-01 16:29:56 +0000 |
commit | 2eeedd71534573466baba4f96e92c7fc892a35dc (patch) | |
tree | 9eb13fc2e6e1cab6654221bae35e506e2121f7a5 /sys | |
parent | af36729d04fd3e82879e969d3905a95ae3e816b8 (diff) |
Fix some ioctl permission checks on the basis of what if_wi.c does.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net80211/ieee80211_ioctl.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index 176bc97d209..7dad0f4221d 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_ioctl.c,v 1.7 2005/02/27 22:27:56 reyk Exp $ */ +/* $OpenBSD: ieee80211_ioctl.c,v 1.8 2005/04/01 16:29:55 uwe Exp $ */ /* $NetBSD: ieee80211_ioctl.c,v 1.15 2004/05/06 02:58:16 dyoung Exp $ */ /*- @@ -825,6 +825,18 @@ ieee80211_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) #endif switch (cmd) { + case SIOCS80211NWID: + case SIOCS80211NWKEY: + case SIOCS80211POWER: + case SIOCS80211TXPOWER: + error = suser(curproc, 0); + if (error) + return (error); + default: + break; + } + + switch (cmd) { case SIOCSIFADDR: case SIOCGIFADDR: #ifdef __OpenBSD__ @@ -1062,8 +1074,6 @@ ieee80211_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) break; case SIOCS80211TXPOWER: txpower = (struct ieee80211_txpower *)data; - if ((error = suser(curproc, 0))) - break; if ((ic->ic_caps & IEEE80211_C_TXPMGT) == 0) { error = EINVAL; break; |