diff options
author | phk <phk@FreeBSD.org> | 1999-01-30 12:17:38 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-01-30 12:17:38 +0000 |
commit | 67f187760e45386080ca97c6bc73608f9fe52ae5 (patch) | |
tree | 640104e6ae29a9d3ec3b379eab1297863b5d84c5 /sys/alpha/tlsb/zs_tlsb.c | |
parent | 6c80ae4325fb5d1cab94603607c94d646aee0d8e (diff) | |
download | FreeBSD-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/alpha/tlsb/zs_tlsb.c')
-rw-r--r-- | sys/alpha/tlsb/zs_tlsb.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/alpha/tlsb/zs_tlsb.c b/sys/alpha/tlsb/zs_tlsb.c index e88b8b1..0bfa15d 100644 --- a/sys/alpha/tlsb/zs_tlsb.c +++ b/sys/alpha/tlsb/zs_tlsb.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: zs_tlsb.c,v 1.5 1998/07/31 09:20:01 dfr Exp $ + * $Id: zs_tlsb.c,v 1.6 1998/11/15 18:25:16 dfr Exp $ */ /* * This driver is a hopeless hack to get the SimOS console working. A real @@ -266,9 +266,10 @@ zsopen(dev_t dev, int flag, int mode, struct proc *p) tp->t_oflag = TTYDEF_OFLAG; tp->t_cflag = TTYDEF_CFLAG|CLOCAL; tp->t_lflag = TTYDEF_LFLAG; - tp->t_ispeed = tp->t_ospeed = 9600; + tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; ttsetwater(tp); - } else if (tp->t_state&TS_XCLUDE && p->p_ucred->cr_uid != 0) { + } else if (tp->t_state & TS_XCLUDE && + suser(p->p_ucred, &p->p_acflag)) { splx(s); return EBUSY; } |