diff options
author | green <green@FreeBSD.org> | 2003-11-05 04:16:48 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 2003-11-05 04:16:48 +0000 |
commit | 932794c27cf2ec2241eadf3b4891463fa9eb2432 (patch) | |
tree | c8b64afeb45c08d67d4b6339d0cb867471c49ba6 /sys/net80211 | |
parent | 66e5a49572d931f4ba92109cdc6e7040a3706158 (diff) | |
download | FreeBSD-src-932794c27cf2ec2241eadf3b4891463fa9eb2432.zip FreeBSD-src-932794c27cf2ec2241eadf3b4891463fa9eb2432.tar.gz |
Fix a reversed suser(9) in SIOCG80211:IEEE80211_IOC_WEPKEY which prevents
root from reading the wireless card's WEP keys, but allows non-root.
Diffstat (limited to 'sys/net80211')
-rw-r--r-- | sys/net80211/ieee80211_ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index 6065a52..c6cfa7c 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -777,7 +777,7 @@ ieee80211_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) } len = (u_int) ic->ic_nw_keys[kid].wk_len; /* NB: only root can read WEP keys */ - if (suser(curthread)) { + if (suser(curthread) == 0) { bcopy(ic->ic_nw_keys[kid].wk_key, tmpkey, len); } else { bzero(tmpkey, len); |