summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k/dev
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2009-10-31 12:00:09 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2009-10-31 12:00:09 +0000
commit04783f7109699fb1efc94f9822ac1e849dc0b7ff (patch)
tree11514d25f29a5322b91cbc57e3b913945809976a /sys/arch/mvme88k/dev
parent4a9bd3706fe9ef219f0658e9acc9ab43b2bfd422 (diff)
Use suser when possible. Suggested by miod@.
miod@ deraadt@ ok.
Diffstat (limited to 'sys/arch/mvme88k/dev')
-rw-r--r--sys/arch/mvme88k/dev/cl.c4
-rw-r--r--sys/arch/mvme88k/dev/dart.c4
-rw-r--r--sys/arch/mvme88k/dev/vx.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/mvme88k/dev/cl.c b/sys/arch/mvme88k/dev/cl.c
index 5b7a1c0adc0..d20edb82fa1 100644
--- a/sys/arch/mvme88k/dev/cl.c
+++ b/sys/arch/mvme88k/dev/cl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cl.c,v 1.55 2009/10/31 06:40:16 deraadt Exp $ */
+/* $OpenBSD: cl.c,v 1.56 2009/10/31 12:00:07 fgsch Exp $ */
/*
* Copyright (c) 1995 Dale Rahn. All rights reserved.
@@ -600,7 +600,7 @@ clopen(dev, flag, mode, p)
bus_space_write_1(sc->sc_iot, sc->sc_ioh, CL_CAR,
save);
}
- } else if (tp->t_state & TS_XCLUDE && p->p_ucred->cr_uid != 0) {
+ } else if (tp->t_state & TS_XCLUDE && suser(p, 0) != 0) {
splx(s);
return EBUSY;
}
diff --git a/sys/arch/mvme88k/dev/dart.c b/sys/arch/mvme88k/dev/dart.c
index 32a3f6e3d42..ac4cc5e03b7 100644
--- a/sys/arch/mvme88k/dev/dart.c
+++ b/sys/arch/mvme88k/dev/dart.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dart.c,v 1.52 2009/10/31 06:40:16 deraadt Exp $ */
+/* $OpenBSD: dart.c,v 1.53 2009/10/31 12:00:07 fgsch Exp $ */
/*
* Mach Operating System
@@ -665,7 +665,7 @@ dartopen(dev_t dev, int flag, int mode, struct proc *p)
ttsetwater(tp);
(void)dartmctl(dev, TIOCM_DTR | TIOCM_RTS, DMSET);
tp->t_state |= TS_CARR_ON;
- } else if (tp->t_state & TS_XCLUDE && p->p_ucred->cr_uid != 0) {
+ } else if (tp->t_state & TS_XCLUDE && suser(p, 0) != 0) {
splx(s);
return (EBUSY);
}
diff --git a/sys/arch/mvme88k/dev/vx.c b/sys/arch/mvme88k/dev/vx.c
index c39b0717d30..b63546b3697 100644
--- a/sys/arch/mvme88k/dev/vx.c
+++ b/sys/arch/mvme88k/dev/vx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vx.c,v 1.39 2008/09/23 04:44:31 miod Exp $ */
+/* $OpenBSD: vx.c,v 1.40 2009/10/31 12:00:07 fgsch Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
* All rights reserved.
@@ -463,7 +463,7 @@ vxopen(dev_t dev, int flag, int mode, struct proc *p)
(void)vx_mctl(dev, TIOCM_DTR | TIOCM_RTS, DMSET);
tp->t_state |= TS_CARR_ON;
- } else if (tp->t_state & TS_XCLUDE && p->p_ucred->cr_uid != 0) {
+ } else if (tp->t_state & TS_XCLUDE && suser(p, 0) != 0) {
splx(s);
return (EBUSY);
}