summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/an.c6
-rw-r--r--sys/dev/ic/awi_wep.c5
-rw-r--r--sys/dev/ic/com.c4
-rw-r--r--sys/dev/ic/cy.c4
-rw-r--r--sys/dev/ic/if_wi.c10
-rw-r--r--sys/dev/ic/if_wi_hostap.c8
-rw-r--r--sys/dev/ic/z8530tty.c4
7 files changed, 22 insertions, 19 deletions
diff --git a/sys/dev/ic/an.c b/sys/dev/ic/an.c
index ee6adcbae24..80c20a42765 100644
--- a/sys/dev/ic/an.c
+++ b/sys/dev/ic/an.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: an.c,v 1.27 2003/06/25 22:28:14 mickey Exp $ */
+/* $OpenBSD: an.c,v 1.28 2003/08/15 20:32:16 tedu Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -1062,7 +1062,7 @@ an_ioctl(ifp, command, data)
break;
#ifdef ANCACHE
if (areq.an_type == AN_RID_ZERO_CACHE) {
- error = suser(p->p_ucred, &p->p_acflag);
+ error = suser(p, 0);
if (error)
break;
sc->an_sigitems = sc->an_nextitem = 0;
@@ -1086,7 +1086,7 @@ an_ioctl(ifp, command, data)
error = copyout(&areq, ifr->ifr_data, sizeof(areq));
break;
case SIOCSAIRONET:
- error = suser(p->p_ucred, &p->p_acflag);
+ error = suser(p, 0);
if (error)
break;
error = copyin(ifr->ifr_data, &areq, sizeof(areq));
diff --git a/sys/dev/ic/awi_wep.c b/sys/dev/ic/awi_wep.c
index 14daa17b8ee..c0b611f99c3 100644
--- a/sys/dev/ic/awi_wep.c
+++ b/sys/dev/ic/awi_wep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: awi_wep.c,v 1.8 2002/03/14 01:26:54 millert Exp $ */
+/* $OpenBSD: awi_wep.c,v 1.9 2003/08/15 20:32:16 tedu Exp $ */
/* $NetBSD: awi_wep.c,v 1.2 2000/07/04 14:47:58 onoe Exp $ */
/*
@@ -207,6 +207,9 @@ awi_wep_getnwkey(sc, nwkey)
#ifdef __FreeBSD__
suerr = suser(curproc);
#else
+#ifdef __OpenBSD__
+ suerr = suser(curproc, 0);
+#else
suerr = suser(curproc->p_ucred, &curproc->p_acflag);
#endif
error = 0;
diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c
index f34f3d7f95d..c451bb6db23 100644
--- a/sys/dev/ic/com.c
+++ b/sys/dev/ic/com.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com.c,v 1.91 2003/07/15 03:15:58 jason Exp $ */
+/* $OpenBSD: com.c,v 1.92 2003/08/15 20:32:16 tedu Exp $ */
/* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */
/*
@@ -884,7 +884,7 @@ comioctl(dev, cmd, data, flag, p)
case TIOCSFLAGS: {
int userbits, driverbits = 0;
- error = suser(p->p_ucred, &p->p_acflag);
+ error = suser(p, 0);
if (error != 0)
return(EPERM);
diff --git a/sys/dev/ic/cy.c b/sys/dev/ic/cy.c
index c1c4908476a..04fb4d49c20 100644
--- a/sys/dev/ic/cy.c
+++ b/sys/dev/ic/cy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cy.c,v 1.22 2003/08/05 16:14:47 markus Exp $ */
+/* $OpenBSD: cy.c,v 1.23 2003/08/15 20:32:17 tedu Exp $ */
/*
* Copyright (c) 1996 Timo Rossi.
* All rights reserved.
@@ -589,7 +589,7 @@ cyioctl(dev, cmd, data, flag, p)
break;
case TIOCSFLAGS:
- error = suser(p->p_ucred, &p->p_acflag);
+ error = suser(p, 0);
if (error != 0)
return (EPERM);
diff --git a/sys/dev/ic/if_wi.c b/sys/dev/ic/if_wi.c
index a14bf871442..5b195d646cc 100644
--- a/sys/dev/ic/if_wi.c
+++ b/sys/dev/ic/if_wi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi.c,v 1.96 2003/06/07 21:14:42 mickey Exp $ */
+/* $OpenBSD: if_wi.c,v 1.97 2003/08/15 20:32:17 tedu Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -124,7 +124,7 @@ u_int32_t widebug = WIDEBUG;
#if !defined(lint) && !defined(__OpenBSD__)
static const char rcsid[] =
- "$OpenBSD: if_wi.c,v 1.96 2003/06/07 21:14:42 mickey Exp $";
+ "$OpenBSD: if_wi.c,v 1.97 2003/08/15 20:32:17 tedu Exp $";
#endif /* lint */
#ifdef foo
@@ -1515,7 +1515,7 @@ wi_ioctl(ifp, command, data)
case SIOCS80211NWID:
case SIOCS80211NWKEY:
case SIOCS80211POWER:
- error = suser(p->p_ucred, &p->p_acflag);
+ error = suser(p, 0);
if (error) {
splx(s);
return (error);
@@ -1603,7 +1603,7 @@ wi_ioctl(ifp, command, data)
break;
case WI_RID_DEFLT_CRYPT_KEYS:
/* For non-root user, return all-zeroes keys */
- if (suser(p->p_ucred, &p->p_acflag))
+ if (suser(p, 0))
bzero((char *)&wreq,
sizeof(struct wi_ltv_keys));
else
@@ -2755,7 +2755,7 @@ wi_get_nwkey(sc, nwkey)
nwkey->i_defkid = sc->wi_tx_key + 1;
/* do not show any keys to non-root user */
- error = suser(curproc->p_ucred, &curproc->p_acflag);
+ error = suser(curproc, 0);
for (i = 0; i < IEEE80211_WEP_NKID; i++) {
if (nwkey->i_key[i].i_keydat == NULL)
continue;
diff --git a/sys/dev/ic/if_wi_hostap.c b/sys/dev/ic/if_wi_hostap.c
index 0d6f069c2b1..6be36bd6e73 100644
--- a/sys/dev/ic/if_wi_hostap.c
+++ b/sys/dev/ic/if_wi_hostap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi_hostap.c,v 1.25 2003/05/16 02:30:40 millert Exp $ */
+/* $OpenBSD: if_wi_hostap.c,v 1.26 2003/08/15 20:32:17 tedu Exp $ */
/*
* Copyright (c) 2002
@@ -1203,7 +1203,7 @@ wihap_ioctl(struct wi_softc *sc, u_long command, caddr_t data)
switch (command) {
case SIOCHOSTAP_DEL:
- if ((error = suser(p->p_ucred, &p->p_acflag)))
+ if ((error = suser(p, 0)))
break;
if ((error = copyin(ifr->ifr_data, &reqsta, sizeof(reqsta))))
break;
@@ -1247,7 +1247,7 @@ wihap_ioctl(struct wi_softc *sc, u_long command, caddr_t data)
break;
case SIOCHOSTAP_ADD:
- if ((error = suser(p->p_ucred, &p->p_acflag)))
+ if ((error = suser(p, 0)))
break;
if ((error = copyin(ifr->ifr_data, &reqsta, sizeof(reqsta))))
break;
@@ -1270,7 +1270,7 @@ wihap_ioctl(struct wi_softc *sc, u_long command, caddr_t data)
break;
case SIOCHOSTAP_SFLAGS:
- if ((error = suser(p->p_ucred, &p->p_acflag)))
+ if ((error = suser(p, 0)))
break;
if ((error = copyin(ifr->ifr_data, &flag, sizeof(int))))
break;
diff --git a/sys/dev/ic/z8530tty.c b/sys/dev/ic/z8530tty.c
index 98d6d66f874..c414f09358f 100644
--- a/sys/dev/ic/z8530tty.c
+++ b/sys/dev/ic/z8530tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: z8530tty.c,v 1.12 2003/06/02 23:28:02 millert Exp $ */
+/* $OpenBSD: z8530tty.c,v 1.13 2003/08/15 20:32:17 tedu Exp $ */
/* $NetBSD: z8530tty.c,v 1.13 1996/10/16 20:42:14 gwr Exp $ */
/*
@@ -536,7 +536,7 @@ zsioctl(dev, cmd, data, flag, p)
break;
case TIOCSFLAGS:
- error = suser(p->p_ucred, &p->p_acflag);
+ error = suser(p, 0);
if (error != 0)
return (EPERM);
tmp = *(int *)data;