summaryrefslogtreecommitdiffstats
path: root/sys/dev/si
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-01-30 12:17:38 +0000
committerphk <phk@FreeBSD.org>1999-01-30 12:17:38 +0000
commit67f187760e45386080ca97c6bc73608f9fe52ae5 (patch)
tree640104e6ae29a9d3ec3b379eab1297863b5d84c5 /sys/dev/si
parent6c80ae4325fb5d1cab94603607c94d646aee0d8e (diff)
downloadFreeBSD-src-67f187760e45386080ca97c6bc73608f9fe52ae5.zip
FreeBSD-src-67f187760e45386080ca97c6bc73608f9fe52ae5.tar.gz
Use suser() to check for super user rather than examining cr_uid directly.
Use TTYDEF_SPEED rather than 9600 a couple of places. Reviewed by: bde, with a few grumbles.
Diffstat (limited to 'sys/dev/si')
-rw-r--r--sys/dev/si/si.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c
index 230e387..95a4e049 100644
--- a/sys/dev/si/si.c
+++ b/sys/dev/si/si.c
@@ -30,7 +30,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHORS BE LIABLE.
*
- * $Id: si.c,v 1.77 1998/08/23 10:12:12 bde Exp $
+ * $Id: si.c,v 1.78 1999/01/12 00:36:35 eivind Exp $
*/
#ifndef lint
@@ -1205,7 +1205,8 @@ open_top:
goto open_top;
}
}
- if (tp->t_state & TS_XCLUDE && p->p_ucred->cr_uid != 0) {
+ if (tp->t_state & TS_XCLUDE &&
+ suser(p->p_ucred, &p->p_acflag)) {
DPRINT((pp, DBG_OPEN|DBG_FAIL,
"already open and EXCLUSIVE set\n"));
error = EBUSY;
OpenPOWER on IntegriCloud