From: deraadt Date: Sun, 11 Oct 2015 15:25:39 +0000 (+0000) Subject: In pledge "tty", allow TIOCSWINSZ. stty(1) is the obvious silly use. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a7db81ee83fce04c27ba6a3f7747f0c61712d522;p=openbsd In pledge "tty", allow TIOCSWINSZ. stty(1) is the obvious silly use. The more important use will be tmux(1) and other active window size controlling programs. There seems little risk in exposing this small tty setting alongside the tcsetattr() family. ok millert --- diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c index 661223226a6..4fb0b837b92 100644 --- a/sys/kern/kern_pledge.c +++ b/sys/kern/kern_pledge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_pledge.c,v 1.11 2015/10/11 01:56:56 guenther Exp $ */ +/* $OpenBSD: kern_pledge.c,v 1.12 2015/10/11 15:25:39 deraadt Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott @@ -1031,6 +1031,7 @@ pledge_ioctl_check(struct proc *p, long com, void *v) return (ENOTTY); case TIOCGPGRP: case TIOCGWINSZ: /* various programs */ + case TIOCSWINSZ: if (fp->f_type == DTYPE_VNODE && (vp->v_flag & VISTTY)) return (0); break;