summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1999-01-30 12:17:38 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1999-01-30 12:17:38 +0000
commit4e2d2aa1cd4f4f0351b1c984930edcdde311c296 (patch)
treeb7a48795d9967f095d3ec0a1a72925f21db011aa /sys/kern
parent871f5df0ef4736bad5a1d3445abbb12eb8754c30 (diff)
Notes
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/tty.c6
-rw-r--r--sys/kern/tty_pty.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index faa675e82756..592da5dfe399 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)tty.c 8.8 (Berkeley) 1/21/94
- * $Id: tty.c,v 1.111 1999/01/08 17:31:12 eivind Exp $
+ * $Id: tty.c,v 1.112 1999/01/28 17:32:00 dillon Exp $
*/
/*-
@@ -981,9 +981,9 @@ ttioctl(tp, cmd, data, flag)
splx(s);
break;
case TIOCSTI: /* simulate terminal input */
- if (p->p_ucred->cr_uid && (flag & FREAD) == 0)
+ if ((flag & FREAD) == 0 && suser(p->p_ucred, &p->p_acflag))
return (EPERM);
- if (p->p_ucred->cr_uid && !isctty(p, tp))
+ if (!isctty(p, tp) && suser(p->p_ucred, &p->p_acflag))
return (EACCES);
s = spltty();
(*linesw[tp->t_line].l_rint)(*(u_char *)data, tp);
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index 214f103bb345..36afd3b59da5 100644
--- a/sys/kern/tty_pty.c
+++ b/sys/kern/tty_pty.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tty_pty.c 8.4 (Berkeley) 2/20/95
- * $Id: tty_pty.c,v 1.53 1998/07/15 12:18:30 bde Exp $
+ * $Id: tty_pty.c,v 1.54 1998/08/23 08:26:42 bde Exp $
*/
/*
@@ -183,7 +183,7 @@ ptsopen(dev, flag, devtype, p)
tp->t_lflag = TTYDEF_LFLAG;
tp->t_cflag = TTYDEF_CFLAG;
tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
- } 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))
return (EBUSY);
if (tp->t_oproc) /* Ctrlr still around. */
(void)(*linesw[tp->t_line].l_modem)(tp, 1);