diff options
author | 2005-04-03 08:06:14 +0000 | |
---|---|---|
committer | 2005-04-03 08:06:14 +0000 | |
commit | 241421de6c83260f4f5e3cb94190c4964ae8262e (patch) | |
tree | 7ff88f6a08edadf8ef579bc8eeadc1241994a91e | |
parent | hppa64 (diff) | |
download | wireguard-openbsd-241421de6c83260f4f5e3cb94190c4964ae8262e.tar.xz wireguard-openbsd-241421de6c83260f4f5e3cb94190c4964ae8262e.zip |
remove redundant suser() checks
-rw-r--r-- | sys/dev/ic/ath.c | 8 | ||||
-rw-r--r-- | sys/net80211/ieee80211_ioctl.c | 4 |
2 files changed, 2 insertions, 10 deletions
diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c index cb4fe0bdf80..ce2756ffe89 100644 --- a/sys/dev/ic/ath.c +++ b/sys/dev/ic/ath.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ath.c,v 1.17 2005/04/02 22:09:31 uwe Exp $ */ +/* $OpenBSD: ath.c,v 1.18 2005/04/03 08:06:14 uwe Exp $ */ /* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */ /*- @@ -1034,8 +1034,6 @@ 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) { @@ -1044,8 +1042,6 @@ 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) { /* @@ -1072,8 +1068,6 @@ 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 diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index 32c04a81af7..2bfb9e71ba3 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_ioctl.c,v 1.10 2005/04/02 22:00:49 uwe Exp $ */ +/* $OpenBSD: ieee80211_ioctl.c,v 1.11 2005/04/03 08:06:14 uwe Exp $ */ /* $NetBSD: ieee80211_ioctl.c,v 1.15 2004/05/06 02:58:16 dyoung Exp $ */ /*- @@ -1094,8 +1094,6 @@ ieee80211_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) txpower->i_val = ic->ic_txpower; break; case SIOCSIFMTU: - if ((error = suser(curproc, 0)) != 0) - break; ifr = (struct ifreq *)data; if (!(IEEE80211_MTU_MIN <= ifr->ifr_mtu && ifr->ifr_mtu <= IEEE80211_MTU_MAX)) |