diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-22 10:35:24 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-22 10:35:24 +0000 |
commit | 412a3ce13e105ed0470239f4bdc6aec3f467f0a3 (patch) | |
tree | 42461a5ae2eda986f7a3dd429451c07da39c417f /sys/kern | |
parent | 7faad4293e4f0647cc8b240264d3712285fbbd25 (diff) |
After some consideration, simply allow TIOCSCTTY in the "tty" pledge.
Discussion with nicm.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_pledge.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c index a5c996e94af..ea9af2323da 100644 --- a/sys/kern/kern_pledge.c +++ b/sys/kern/kern_pledge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_pledge.c,v 1.62 2015/10/20 18:04:03 deraadt Exp $ */ +/* $OpenBSD: kern_pledge.c,v 1.63 2015/10/22 10:35:23 deraadt Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org> @@ -1022,11 +1022,6 @@ pledge_ioctl_check(struct proc *p, long com, void *v) fp->f_type == DTYPE_VNODE && (vp->v_flag & VISTTY)) return (0); break; - case TIOCSCTTY: /* tmux etc */ - if ((p->p_p->ps_pledge & PLEDGE_ID) && - fp->f_type == DTYPE_VNODE && (vp->v_flag & VISTTY)) - return (0); - break; case TIOCSPGRP: if ((p->p_p->ps_pledge & PLEDGE_PROC) == 0) break; @@ -1047,6 +1042,7 @@ pledge_ioctl_check(struct proc *p, long com, void *v) case TIOCSETAW: /* cu, ... */ case TIOCSETAF: /* tcsetattr TCSAFLUSH, script */ case TIOCFLUSH: /* getty */ + case TIOCSCTTY: /* forkpty(3), login_tty(3), ... */ if (fp->f_type == DTYPE_VNODE && (vp->v_flag & VISTTY)) return (0); break; |