summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_pledge.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c
index a155f22cbed..08329c03a61 100644
--- a/sys/kern/kern_pledge.c
+++ b/sys/kern/kern_pledge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_pledge.c,v 1.43 2015/10/17 22:54:23 deraadt Exp $ */
+/* $OpenBSD: kern_pledge.c,v 1.44 2015/10/17 22:58:30 deraadt Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -1103,6 +1103,11 @@ pledge_ioctl_check(struct proc *p, long com, void *v)
return (0);
break;
#endif
+ case TIOCSCTTY: /* tmux etc */
+ if ((p->p_p->ps_pledge & PLEDGE_ID) == 0 &&
+ fp->f_type == DTYPE_VNODE && (vp->v_flag & VISTTY))
+ return (0);
+ break;
case TIOCSPGRP:
if ((p->p_p->ps_pledge & PLEDGE_PROC) == 0)
break;