From 93bc6376e39b665f35236b94f2a07e6c050692c0 Mon Sep 17 00:00:00 2001 From: deraadt Date: Wed, 21 Jun 2017 17:13:20 +0000 Subject: [PATCH] Permit TIOCSTAT on a tty. --- sys/kern/kern_pledge.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c index 150b3f3a903..63bb8745846 100644 --- a/sys/kern/kern_pledge.c +++ b/sys/kern/kern_pledge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_pledge.c,v 1.214 2017/06/19 18:35:05 bluhm Exp $ */ +/* $OpenBSD: kern_pledge.c,v 1.215 2017/06/21 17:13:20 deraadt Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott @@ -1286,6 +1286,7 @@ pledge_ioctl(struct proc *p, long com, struct file *fp) case TIOCGPGRP: case TIOCGETA: case TIOCGWINSZ: /* ENOTTY return for non-tty */ + case TIOCSTAT: /* csh */ if (fp->f_type == DTYPE_VNODE && (vp->v_flag & VISTTY)) return (0); return (ENOTTY); -- 2.20.1