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/alpha | |
parent | 4a9bd3706fe9ef219f0658e9acc9ab43b2bfd422 (diff) |
Use suser when possible. Suggested by miod@.
miod@ deraadt@ ok.
Diffstat (limited to 'sys/arch/alpha')
-rw-r--r-- | sys/arch/alpha/alpha/promcons.c | 4 | ||||
-rw-r--r-- | sys/arch/alpha/tc/scc.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/alpha/alpha/promcons.c b/sys/arch/alpha/alpha/promcons.c index 279cc3e0235..31a893c8775 100644 --- a/sys/arch/alpha/alpha/promcons.c +++ b/sys/arch/alpha/alpha/promcons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: promcons.c,v 1.10 2009/10/31 06:40:14 deraadt Exp $ */ +/* $OpenBSD: promcons.c,v 1.11 2009/10/31 12:00:05 fgsch Exp $ */ /* $NetBSD: promcons.c,v 1.5 1996/11/13 22:20:55 cgd Exp $ */ /* @@ -93,7 +93,7 @@ promopen(dev, flag, mode, p) ttsetwater(tp); setuptimeout = 1; - } 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/alpha/tc/scc.c b/sys/arch/alpha/tc/scc.c index 7ef8289c2a5..6977c5fb7f4 100644 --- a/sys/arch/alpha/tc/scc.c +++ b/sys/arch/alpha/tc/scc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scc.c,v 1.23 2009/10/31 06:40:16 deraadt Exp $ */ +/* $OpenBSD: scc.c,v 1.24 2009/10/31 12:00:05 fgsch Exp $ */ /* $NetBSD: scc.c,v 1.58 2002/03/17 19:40:27 atatat Exp $ */ /* @@ -482,7 +482,7 @@ sccopen(dev, flag, mode, p) #endif (void) sccparam(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); (void) sccmctl(sc, SCCLINE(dev), DML_DTR, DMSET); s = spltty(); |