summaryrefslogtreecommitdiffstats
path: root/sys/dev/dgb
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/dgb
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/dgb')
-rw-r--r--sys/dev/dgb/dgb.c5
-rw-r--r--sys/dev/dgb/dgm.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/dgb/dgb.c b/sys/dev/dgb/dgb.c
index 7aeb258..14211bc 100644
--- a/sys/dev/dgb/dgb.c
+++ b/sys/dev/dgb/dgb.c
@@ -1,5 +1,5 @@
/*-
- * dgb.c $Id: dgb.c,v 1.40 1998/08/23 08:26:39 bde Exp $
+ * dgb.c $Id: dgb.c,v 1.41 1998/12/07 21:58:17 archie Exp $
*
* Digiboard driver.
*
@@ -1032,7 +1032,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)) {
error = EBUSY;
goto out;
}
diff --git a/sys/dev/dgb/dgm.c b/sys/dev/dgb/dgm.c
index 8b0ca1f..9321bb9 100644
--- a/sys/dev/dgb/dgm.c
+++ b/sys/dev/dgb/dgm.c
@@ -1,5 +1,5 @@
/*-
- * $Id: dgm.c,v 1.5 1998/08/23 08:26:40 bde Exp $
+ * $Id: dgm.c,v 1.6 1998/12/07 21:58:18 archie Exp $
*
* This driver and the associated header files support the ISA PC/Xem
* Digiboards. Its evolutionary roots are described below.
@@ -833,7 +833,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)) {
error = EBUSY;
goto out;
}
OpenPOWER on IntegriCloud