diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2009-10-31 12:00:09 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2009-10-31 12:00:09 +0000 |
commit | 04783f7109699fb1efc94f9822ac1e849dc0b7ff (patch) | |
tree | 11514d25f29a5322b91cbc57e3b913945809976a /sys/arch/mvme68k | |
parent | 4a9bd3706fe9ef219f0658e9acc9ab43b2bfd422 (diff) |
Use suser when possible. Suggested by miod@.
miod@ deraadt@ ok.
Diffstat (limited to 'sys/arch/mvme68k')
-rw-r--r-- | sys/arch/mvme68k/dev/cl.c | 4 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/dart.c | 4 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/wl.c | 4 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/zs.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/sys/arch/mvme68k/dev/cl.c b/sys/arch/mvme68k/dev/cl.c index 4c53576b10f..015e1d454b9 100644 --- a/sys/arch/mvme68k/dev/cl.c +++ b/sys/arch/mvme68k/dev/cl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cl.c,v 1.48 2009/10/31 06:40:16 deraadt Exp $ */ +/* $OpenBSD: cl.c,v 1.49 2009/10/31 12:00:06 fgsch Exp $ */ /* * Copyright (c) 1995 Dale Rahn. All rights reserved. @@ -650,7 +650,7 @@ if (channel == 2) { /* test one channel now */ #endif /* CL_DMA_WORKS */ sc->cl_reg->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/mvme68k/dev/dart.c b/sys/arch/mvme68k/dev/dart.c index 73e33a83450..ef1bf842934 100644 --- a/sys/arch/mvme68k/dev/dart.c +++ b/sys/arch/mvme68k/dev/dart.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dart.c,v 1.3 2009/10/31 06:40:16 deraadt Exp $ */ +/* $OpenBSD: dart.c,v 1.4 2009/10/31 12:00:07 fgsch Exp $ */ /* * Mach Operating System @@ -655,7 +655,7 @@ dartopen(dev_t dev, int flag, int mode, struct proc *p) (void)dartmctl(sc, port, 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/mvme68k/dev/wl.c b/sys/arch/mvme68k/dev/wl.c index 7a000e827b1..684f2416541 100644 --- a/sys/arch/mvme68k/dev/wl.c +++ b/sys/arch/mvme68k/dev/wl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wl.c,v 1.19 2009/10/31 06:40:16 deraadt Exp $ */ +/* $OpenBSD: wl.c,v 1.20 2009/10/31 12:00:07 fgsch Exp $ */ /* * Copyright (c) 1995 Dale Rahn. All rights reserved. @@ -558,7 +558,7 @@ wlopen(dev, flag, mode, p) sc->cl_reg->cl_ier = IER_MDM | IER_RXD; sc->cl_reg->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/mvme68k/dev/zs.c b/sys/arch/mvme68k/dev/zs.c index 3d37b2e98d7..25dd8368c64 100644 --- a/sys/arch/mvme68k/dev/zs.c +++ b/sys/arch/mvme68k/dev/zs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zs.c,v 1.28 2009/10/31 06:40:16 deraadt Exp $ */ +/* $OpenBSD: zs.c,v 1.29 2009/10/31 12:00:07 fgsch Exp $ */ /* * Copyright (c) 2000 Steve Murphree, Jr. @@ -365,7 +365,7 @@ zsopen(dev, flag, mode, p) zs_init(zp); if ((zp->modem_state & SCC_DCD) != 0) 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) return (EBUSY); error = ((*linesw[tp->t_line].l_open) (dev, tp)); |