From 5c8bb90bf7268afbc9e28ccac23cae1fdaf73a4c Mon Sep 17 00:00:00 2001 From: Brian Feldman Date: Wed, 5 Nov 2003 04:16:48 +0000 Subject: 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. --- sys/net80211/ieee80211_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index 6065a524fe86..c6cfa7c826c3 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); -- cgit v1.3