diff options
author | Uwe Stuehler <uwe@cvs.openbsd.org> | 2005-04-02 23:21:34 +0000 |
---|---|---|
committer | Uwe Stuehler <uwe@cvs.openbsd.org> | 2005-04-02 23:21:34 +0000 |
commit | 39225d4cbc6135093c931724a3d499cb2dfa8be2 (patch) | |
tree | f27a05350a3b7b26da6d3a6fc55f2c868d49a276 | |
parent | 1f16d04d4f7d0bbba59575a40edf154ada19cf47 (diff) |
check permissions on 80211 ioctls
-rw-r--r-- | sys/dev/ic/awi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/ic/awi.c b/sys/dev/ic/awi.c index e0dcd997d58..1e8e4f7d2c1 100644 --- a/sys/dev/ic/awi.c +++ b/sys/dev/ic/awi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: awi.c,v 1.17 2005/02/21 11:15:59 dlg Exp $ */ +/* $OpenBSD: awi.c,v 1.18 2005/04/02 23:21:33 uwe Exp $ */ /* $NetBSD: awi.c,v 1.26 2000/07/21 04:48:55 onoe Exp $ */ /*- @@ -540,6 +540,8 @@ awi_ioctl(ifp, cmd, data) ifp->if_mtu = ifr->ifr_mtu; break; case SIOCS80211NWID: + if ((error = suser(curproc, 0)) != 0) + break; error = copyin(ifr->ifr_data, &nwid, sizeof(nwid)); if (error) break; @@ -569,6 +571,8 @@ awi_ioctl(ifp, cmd, data) error = copyout(p + 1, ifr->ifr_data, 1 + IEEE80211_NWID_LEN); break; case SIOCS80211NWKEY: + if ((error = suser(curproc, 0)) != 0) + break; error = awi_wep_setnwkey(sc, (struct ieee80211_nwkey *)data); break; case SIOCG80211NWKEY: |