diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1996-06-17 05:25:04 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1996-06-17 05:25:04 +0000 |
commit | 04ae8cfdc9a1fbc1e4517de421c3d06861e34f7d (patch) | |
tree | cf2cc453c7ea5cc18817b7746d2cef64e074e12c | |
parent | be073414b870fd48cfe6d14494455438a6e886d5 (diff) |
Change from my, umm, BSD/OS tree: allow root to run TIOCGPGRP on anything.
-rw-r--r-- | sys/kern/tty.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index e3c9796d778..f9fe6d00b29 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.6 1996/06/10 07:26:22 deraadt Exp $ */ +/* $OpenBSD: tty.c,v 1.7 1996/06/17 05:25:03 downsj Exp $ */ /* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */ /*- @@ -739,7 +739,7 @@ ttioctl(tp, cmd, data, flag, p) *(struct winsize *)data = tp->t_winsize; break; case TIOCGPGRP: /* get pgrp of tty */ - if (!isctty(p, tp)) + if (!isctty(p, tp) && suser(p->p_ucred, &p->p_acflag)) return (ENOTTY); *(int *)data = tp->t_pgrp ? tp->t_pgrp->pg_id : NO_PID; break; |