summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorUwe Stuehler <uwe@cvs.openbsd.org>2005-04-02 22:09:32 +0000
committerUwe Stuehler <uwe@cvs.openbsd.org>2005-04-02 22:09:32 +0000
commita92ed572dfc9f5dfeac7e2611af6c86f9c5c5f44 (patch)
treed55059f6f364eae2edd8d0c5104a180520e7caac /sys/dev/ic
parent05f24c21cfcb3f837c333f4ac657cb64fa13aac6 (diff)
More ioctl permission checks.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/ath.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c
index 87647fff906..cb4fe0bdf80 100644
--- a/sys/dev/ic/ath.c
+++ b/sys/dev/ic/ath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ath.c,v 1.16 2005/03/19 17:27:46 reyk Exp $ */
+/* $OpenBSD: ath.c,v 1.17 2005/04/02 22:09:31 uwe Exp $ */
/* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */
/*-
@@ -1034,6 +1034,8 @@ ath_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
s = splnet();
switch (cmd) {
case SIOCSIFADDR:
+ if ((error = suser(curproc, 0)) != 0)
+ break;
ifp->if_flags |= IFF_UP;
#ifdef INET
if (ifa->ifa_addr->sa_family == AF_INET) {
@@ -1042,6 +1044,8 @@ ath_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
#endif /* INET */
/* FALLTHROUGH */
case SIOCSIFFLAGS:
+ if ((error = suser(curproc, 0)) != 0)
+ break;
if (ifp->if_flags & IFF_UP) {
if (ifp->if_flags & IFF_RUNNING) {
/*
@@ -1068,6 +1072,8 @@ ath_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
+ if ((error = suser(curproc, 0)) != 0)
+ break;
#ifdef __FreeBSD__
/*
* The upper layer has already installed/removed