summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-10-11 15:25:39 +0000
committerderaadt <deraadt@openbsd.org>2015-10-11 15:25:39 +0000
commita7db81ee83fce04c27ba6a3f7747f0c61712d522 (patch)
tree55965d19649f72a9e7bdac16c96fa5259e8290f7
parentConvert some fgetln to getline. (diff)
downloadwireguard-openbsd-a7db81ee83fce04c27ba6a3f7747f0c61712d522.tar.xz
wireguard-openbsd-a7db81ee83fce04c27ba6a3f7747f0c61712d522.zip
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
-rw-r--r--sys/kern/kern_pledge.c3
1 files changed, 2 insertions, 1 deletions
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 <nicm@openbsd.org>
@@ -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;