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/vax/qbus | |
parent | 4a9bd3706fe9ef219f0658e9acc9ab43b2bfd422 (diff) |
Use suser when possible. Suggested by miod@.
miod@ deraadt@ ok.
Diffstat (limited to 'sys/arch/vax/qbus')
-rw-r--r-- | sys/arch/vax/qbus/dhu.c | 4 | ||||
-rw-r--r-- | sys/arch/vax/qbus/dl.c | 4 | ||||
-rw-r--r-- | sys/arch/vax/qbus/dz.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/vax/qbus/dhu.c b/sys/arch/vax/qbus/dhu.c index cbd8c52e7ef..afa56c64ae6 100644 --- a/sys/arch/vax/qbus/dhu.c +++ b/sys/arch/vax/qbus/dhu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhu.c,v 1.13 2009/10/31 06:40:16 deraadt Exp $ */ +/* $OpenBSD: dhu.c,v 1.14 2009/10/31 12:00:07 fgsch Exp $ */ /* $NetBSD: dhu.c,v 1.19 2000/06/04 06:17:01 matt Exp $ */ /* * Copyright (c) 2003, Hugh Graham. @@ -438,7 +438,7 @@ dhuopen(dev, flag, mode, p) } (void) dhuparam(tp, &tp->t_termios); ttsetwater(tp); - } else if ((tp->t_state & TS_XCLUDE) && curproc->p_ucred->cr_uid != 0) + } else if ((tp->t_state & TS_XCLUDE) && suser(curproc, 0) != 0) return (EBUSY); /* Use DMBIS and *not* DMSET or else we clobber incoming bits */ if (dhumctl(sc, line, DML_DTR|DML_RTS, DMBIS) & DML_DCD) diff --git a/sys/arch/vax/qbus/dl.c b/sys/arch/vax/qbus/dl.c index 483fe9559af..32b1eeff260 100644 --- a/sys/arch/vax/qbus/dl.c +++ b/sys/arch/vax/qbus/dl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dl.c,v 1.7 2009/10/31 06:40:16 deraadt Exp $ */ +/* $OpenBSD: dl.c,v 1.8 2009/10/31 12:00:07 fgsch Exp $ */ /* $NetBSD: dl.c,v 1.11 2000/01/24 02:40:29 matt Exp $ */ /*- @@ -309,7 +309,7 @@ dlopen(dev, flag, mode, p) dlparam(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; return ((*linesw[tp->t_line].l_open)(dev, tp)); diff --git a/sys/arch/vax/qbus/dz.c b/sys/arch/vax/qbus/dz.c index ba42e67dab8..25afdf55945 100644 --- a/sys/arch/vax/qbus/dz.c +++ b/sys/arch/vax/qbus/dz.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dz.c,v 1.18 2009/10/31 06:40:16 deraadt Exp $ */ +/* $OpenBSD: dz.c,v 1.19 2009/10/31 12:00:07 fgsch Exp $ */ /* $NetBSD: dz.c,v 1.23 2000/06/04 02:14:12 matt Exp $ */ /* * Copyright (c) 1996 Ken C. Wellsch. All rights reserved. @@ -300,7 +300,7 @@ dzopen(dev_t dev, int flag, int mode, struct proc *p) } (void) dzparam(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); /* Use DMBIS and *not* DMSET or else we clobber incoming bits */ if (dzmctl(sc, line, DML_DTR, DMBIS) & DML_DCD) |