mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-17 13:53:39 +00:00
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.
This commit is contained in:
parent
dfde783410
commit
5c8bb90bf7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=122090
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue