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/hp300 | |
parent | 4a9bd3706fe9ef219f0658e9acc9ab43b2bfd422 (diff) |
Use suser when possible. Suggested by miod@.
miod@ deraadt@ ok.
Diffstat (limited to 'sys/arch/hp300')
-rw-r--r-- | sys/arch/hp300/dev/apci.c | 4 | ||||
-rw-r--r-- | sys/arch/hp300/dev/dca.c | 4 | ||||
-rw-r--r-- | sys/arch/hp300/dev/dcm.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/hp300/dev/apci.c b/sys/arch/hp300/dev/apci.c index e565492500b..3f20e998d3b 100644 --- a/sys/arch/hp300/dev/apci.c +++ b/sys/arch/hp300/dev/apci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apci.c,v 1.34 2009/10/31 06:40:16 deraadt Exp $ */ +/* $OpenBSD: apci.c,v 1.35 2009/10/31 12:00:05 fgsch Exp $ */ /* $NetBSD: apci.c,v 1.9 2000/11/02 00:35:05 eeh Exp $ */ /*- @@ -316,7 +316,7 @@ apciopen(dev, flag, mode, p) /* Flush any pending I/O. */ while ((apci->ap_iir & IIR_IMASK) == IIR_RXRDY) code = apci->ap_data; - } 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); else s = spltty(); diff --git a/sys/arch/hp300/dev/dca.c b/sys/arch/hp300/dev/dca.c index 235cd401ef2..5e32b238f8d 100644 --- a/sys/arch/hp300/dev/dca.c +++ b/sys/arch/hp300/dev/dca.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dca.c,v 1.35 2009/10/31 06:40:16 deraadt Exp $ */ +/* $OpenBSD: dca.c,v 1.36 2009/10/31 12:00:05 fgsch Exp $ */ /* $NetBSD: dca.c,v 1.35 1997/05/05 20:58:18 thorpej Exp $ */ /* @@ -349,7 +349,7 @@ dcaopen(dev, flag, mode, p) while ((dca->dca_iir & IIR_IMASK) == IIR_RXRDY) code = dca->dca_data; - } 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); else s = spltty(); diff --git a/sys/arch/hp300/dev/dcm.c b/sys/arch/hp300/dev/dcm.c index 07f1c5c836c..faecb73e73e 100644 --- a/sys/arch/hp300/dev/dcm.c +++ b/sys/arch/hp300/dev/dcm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dcm.c,v 1.30 2009/10/31 06:40:16 deraadt Exp $ */ +/* $OpenBSD: dcm.c,v 1.31 2009/10/31 12:00:05 fgsch Exp $ */ /* $NetBSD: dcm.c,v 1.41 1997/05/05 20:59:16 thorpej Exp $ */ /* @@ -482,7 +482,7 @@ dcmopen(dev, flag, mode, p) (void) dcmparam(tp, &tp->t_termios); ttsetwater(tp); - } 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); else s = spltty(); |