summaryrefslogtreecommitdiff
path: root/sys/dev/wscons/wsdisplay.c
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/dev/wscons/wsdisplay.c
parent4a9bd3706fe9ef219f0658e9acc9ab43b2bfd422 (diff)
Use suser when possible. Suggested by miod@.
miod@ deraadt@ ok.
Diffstat (limited to 'sys/dev/wscons/wsdisplay.c')
-rw-r--r--sys/dev/wscons/wsdisplay.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c
index ae76e78c419..7754f197c96 100644
--- a/sys/dev/wscons/wsdisplay.c
+++ b/sys/dev/wscons/wsdisplay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsdisplay.c,v 1.94 2009/09/14 04:10:42 miod Exp $ */
+/* $OpenBSD: wsdisplay.c,v 1.95 2009/10/31 12:00:08 fgsch Exp $ */
/* $NetBSD: wsdisplay.c,v 1.82 2005/02/27 00:27:52 perry Exp $ */
/*
@@ -849,7 +849,7 @@ wsdisplayopen(dev_t dev, int flag, int mode, struct proc *p)
wsdisplayparam(tp, &tp->t_termios);
ttsetwater(tp);
} else if ((tp->t_state & TS_XCLUDE) != 0 &&
- p->p_ucred->cr_uid != 0)
+ suser(p, 0) != 0)
return (EBUSY);
tp->t_state |= TS_CARR_ON;