diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 1999-12-15 21:50:11 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 1999-12-15 21:50:11 +0000 |
commit | 7289697672c6056dbd68966b241ca89125436d60 (patch) | |
tree | 2bbe02b741857331104e5935302a9ceca88c464f | |
parent | 1e0aff0613d35875750b1c7c8916011c3219fada (diff) |
Require privileges in LMCSIOINFO.
-rw-r--r-- | sys/dev/pci/if_lmc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/pci/if_lmc.c b/sys/dev/pci/if_lmc.c index f9f10794ca9..44e98098a73 100644 --- a/sys/dev/pci/if_lmc.c +++ b/sys/dev/pci/if_lmc.c @@ -70,7 +70,7 @@ #include <sys/errno.h> #include <sys/malloc.h> #include <sys/kernel.h> -/*#include <sys/proc.h> only for declaration of wakeup() used by vm.h */ +#include <sys/proc.h> #if defined(__FreeBSD__) #include <machine/clock.h> #elif defined(__bsdi__) || defined(__NetBSD__) || defined(__OpenBSD__) @@ -1115,6 +1115,7 @@ lmc_ifioctl(struct ifnet * ifp, ioctl_cmd_t cmd, caddr_t data) #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) lmc_spl_t s; #endif + struct proc *p = curproc; int error = 0; struct ifreq *ifr = (struct ifreq *)data; u_int32_t new_state; @@ -1133,11 +1134,9 @@ lmc_ifioctl(struct ifnet * ifp, ioctl_cmd_t cmd, caddr_t data) break; case LMCIOCSINFO: -#if 0 /* XXX */ error = suser(p->p_ucred, &p->p_acflag); if (error) goto out; -#endif error = copyin(ifr->ifr_data, &ctl, sizeof(lmc_ctl_t)); if (error != 0) |