aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/kern/tty_pty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index 2cc1d0fe2445..364f2731b815 100644
--- a/sys/kern/tty_pty.c
+++ b/sys/kern/tty_pty.c
@@ -200,7 +200,7 @@ ptsopen(struct cdev *dev, int flag, int devtype, struct thread *td)
ttyinitmode(tp, 1, 0);
} else if (tp->t_state & TS_XCLUDE && suser(td))
return (EBUSY);
- else if (pt->pt_prison != td->td_ucred->cr_prison)
+ else if (pt->pt_prison != td->td_ucred->cr_prison && suser(td))
return (EBUSY);
if (tp->t_oproc) /* Ctrlr still around. */
(void)ttyld_modem(tp, 1);