summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruwe <uwe@openbsd.org>2005-04-03 01:35:06 +0000
committeruwe <uwe@openbsd.org>2005-04-03 01:35:06 +0000
commit139582f1537ce832b52e622cc98c01b7a2d85c43 (patch)
tree9977247961cea540c2e1d89dd05d215dfa8730fa
parentA few register offsets in the Parameter Engine were wrong. (diff)
downloadwireguard-openbsd-139582f1537ce832b52e622cc98c01b7a2d85c43.tar.xz
wireguard-openbsd-139582f1537ce832b52e622cc98c01b7a2d85c43.zip
protect SIOCSRAYPARAM and SIOCS80211NWID
-rw-r--r--sys/dev/pcmcia/if_ray.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/pcmcia/if_ray.c b/sys/dev/pcmcia/if_ray.c
index ecadf8e440b..a0aa3041419 100644
--- a/sys/dev/pcmcia/if_ray.c
+++ b/sys/dev/pcmcia/if_ray.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ray.c,v 1.26 2005/01/27 17:04:55 millert Exp $ */
+/* $OpenBSD: if_ray.c,v 1.27 2005/04/03 01:35:06 uwe Exp $ */
/* $NetBSD: if_ray.c,v 1.21 2000/07/05 02:35:54 onoe Exp $ */
/*
@@ -1032,6 +1032,8 @@ ray_ioctl(ifp, cmd, data)
error = ifmedia_ioctl(ifp, ifr, &sc->sc_media, cmd);
break;
case SIOCSRAYPARAM:
+ if ((error = suser(curproc, 0)) != 0)
+ break;
RAY_DPRINTF(("%s: ioctl: cmd SIOCSRAYPARAM\n", ifp->if_xname));
if ((error = copyin(ifr->ifr_data, &pr, sizeof(pr))))
break;
@@ -1058,6 +1060,8 @@ ray_ioctl(ifp, cmd, data)
error = error2 ? error2 : error;
break;
case SIOCS80211NWID:
+ if ((error = suser(curproc, 0)) != 0)
+ break;
RAY_DPRINTF(("%s: ioctl: cmd SIOCS80211NWID\n", ifp->if_xname));
/*
* if later people overwrite thats ok -- the latest version