summaryrefslogtreecommitdiff
path: root/sys/arch/sh/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/sh/dev
parent4a9bd3706fe9ef219f0658e9acc9ab43b2bfd422 (diff)
Use suser when possible. Suggested by miod@.
miod@ deraadt@ ok.
Diffstat (limited to 'sys/arch/sh/dev')
-rw-r--r--sys/arch/sh/dev/scif.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/sh/dev/scif.c b/sys/arch/sh/dev/scif.c
index c2037d934d4..942f5918d0a 100644
--- a/sys/arch/sh/dev/scif.c
+++ b/sys/arch/sh/dev/scif.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scif.c,v 1.8 2009/10/31 06:40:16 deraadt Exp $ */
+/* $OpenBSD: scif.c,v 1.9 2009/10/31 12:00:07 fgsch Exp $ */
/* $NetBSD: scif.c,v 1.47 2006/07/23 22:06:06 ad Exp $ */
/*-
@@ -698,7 +698,7 @@ scifopen(dev_t dev, int flag, int mode, struct proc *p)
if (ISSET(tp->t_state, TS_ISOPEN) &&
ISSET(tp->t_state, TS_XCLUDE) &&
- p->p_ucred->cr_uid != 0)
+ suser(p, 0) != 0)
return (EBUSY);
s = spltty();