diff options
author | wpaul <wpaul@FreeBSD.org> | 2000-09-07 17:05:12 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 2000-09-07 17:05:12 +0000 |
commit | 2e3a03013d4e4bd0aa41dd3f2d5d261d0346ab1f (patch) | |
tree | ae5de933b59cf93a6cc401659332b7803a4174ed /sys/i386/isa/if_wi.c | |
parent | 5e357e63eca80272555cdf0139c306b472e26789 (diff) | |
download | FreeBSD-src-2e3a03013d4e4bd0aa41dd3f2d5d261d0346ab1f.zip FreeBSD-src-2e3a03013d4e4bd0aa41dd3f2d5d261d0346ab1f.tar.gz |
Close PR #20963. Do not pass encryption keys back to the caller via
wi_ioctl() unless they're the superuser.
Diffstat (limited to 'sys/i386/isa/if_wi.c')
-rw-r--r-- | sys/i386/isa/if_wi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/i386/isa/if_wi.c b/sys/i386/isa/if_wi.c index df6fb2a..32fef23 100644 --- a/sys/i386/isa/if_wi.c +++ b/sys/i386/isa/if_wi.c @@ -1008,6 +1008,9 @@ static int wi_ioctl(ifp, command, data) error = copyin(ifr->ifr_data, &wreq, sizeof(wreq)); if (error) break; + /* Don't show WEP keys to non-root users. */ + if (wreq.wi_type == WI_RID_DEFLT_CRYPT_KEYS && suser(p)) + break; if (wreq.wi_type == WI_RID_IFACE_STATS) { bcopy((char *)&sc->wi_stats, (char *)&wreq.wi_val, sizeof(sc->wi_stats)); |