summaryrefslogtreecommitdiff
path: root/sys/dev/ic/an.c
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2000-06-18 03:56:08 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2000-06-18 03:56:08 +0000
commit1cbd1554d2b8673d64f4f3836e5ae350ade9b89a (patch)
tree60790ef60cf4fe31fd474a055ce8fda1a4da924d /sys/dev/ic/an.c
parent9e3e1dbbe5b54134a812219b72fe2bb60920d37a (diff)
Thou shalt not bequeath to mere mortals the ability to change the configuration
of an Aironet device.
Diffstat (limited to 'sys/dev/ic/an.c')
-rw-r--r--sys/dev/ic/an.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/ic/an.c b/sys/dev/ic/an.c
index 7a24e2d0c94..cc96358e5b9 100644
--- a/sys/dev/ic/an.c
+++ b/sys/dev/ic/an.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: an.c,v 1.3 2000/06/18 03:26:51 aaron Exp $ */
+/* $OpenBSD: an.c,v 1.4 2000/06/18 03:56:07 aaron Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -97,6 +97,7 @@
#include <sys/mbuf.h>
#include <sys/malloc.h>
#include <sys/kernel.h>
+#include <sys/proc.h>
#include <sys/socket.h>
#include <sys/timeout.h>
#ifdef ANCACHE
@@ -879,6 +880,7 @@ int an_ioctl(ifp, command, data)
struct an_softc *sc;
struct an_req areq;
struct ifreq *ifr;
+ struct proc *p = curproc;
struct ifaddr *ifa = (struct ifaddr *)data;
s = splimp();
@@ -960,6 +962,9 @@ int an_ioctl(ifp, command, data)
error = copyout(&areq, ifr->ifr_data, sizeof(areq));
break;
case SIOCSAIRONET:
+ error = suser(p->p_ucred, &p->p_acflag);
+ if (error)
+ break;
error = copyin(ifr->ifr_data, &areq, sizeof(areq));
if (error)
break;