From b4e12c03e9860a878d42d088aaa818b50fb7cfd2 Mon Sep 17 00:00:00 2001 From: "Christian S.J. Peron" Date: Tue, 31 Jan 2006 22:19:37 +0000 Subject: [PATCH] Allow root to open prison pts devices too. Pointed out by: rwatson --- sys/kern/tty_pts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/tty_pts.c b/sys/kern/tty_pts.c index a3ab97bb73dc..aa31904b6e5e 100644 --- a/sys/kern/tty_pts.c +++ b/sys/kern/tty_pts.c @@ -265,7 +265,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. */