From dcce7232efba9a590c63f736b9d036e0f2f283f7 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Tue, 24 Dec 2002 14:46:01 +0000 Subject: Require privilege to flush the signal cache on if_an and if_wi 802.11 cards. Reviewed by: imp (if_wi) --- sys/dev/an/if_an.c | 3 +++ sys/dev/wi/if_wi.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/sys/dev/an/if_an.c b/sys/dev/an/if_an.c index cada570c66d19..3dccf0742487c 100644 --- a/sys/dev/an/if_an.c +++ b/sys/dev/an/if_an.c @@ -1328,6 +1328,9 @@ an_ioctl(ifp, command, data) break; #ifdef ANCACHE if (sc->areq.an_type == AN_RID_ZERO_CACHE) { + error = suser(td); + if (error) + break; sc->an_sigitems = sc->an_nextitem = 0; break; } else if (sc->areq.an_type == AN_RID_READ_CACHE) { diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c index 2ed6cc2cefb7b..7340a1cf68c8d 100644 --- a/sys/dev/wi/if_wi.c +++ b/sys/dev/wi/if_wi.c @@ -1736,6 +1736,9 @@ wi_ioctl(ifp, command, data) } #ifdef WICACHE else if (wreq.wi_type == WI_RID_ZERO_CACHE) { + error = suser(td); + if (error) + break; sc->wi_sigitems = sc->wi_nextitem = 0; } else if (wreq.wi_type == WI_RID_READ_CACHE) { char *pt = (char *)&wreq.wi_val; -- cgit v1.3