From 1cff096f392b01279e7a90e2751eb7ef4790e0d8 Mon Sep 17 00:00:00 2001 From: deraadt Date: Sat, 10 Oct 2015 16:35:08 +0000 Subject: [PATCH] shuffle #ifdef TIOCSTI block to avoid a future /*FALLTHROUGH*/ mistake. --- sys/kern/kern_event.c | 2 +- sys/kern/kern_pledge.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 73ca39e01f3..b0f6c8ecd74 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_event.c,v 1.63 2015/10/09 11:47:30 deraadt Exp $ */ +/* $OpenBSD: kern_event.c,v 1.64 2015/10/10 16:35:08 deraadt Exp $ */ /*- * Copyright (c) 1999,2000,2001 Jonathan Lemon diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c index 990f8f4a338..f6394c6872c 100644 --- a/sys/kern/kern_pledge.c +++ b/sys/kern/kern_pledge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_pledge.c,v 1.8 2015/10/10 14:48:03 deraadt Exp $ */ +/* $OpenBSD: kern_pledge.c,v 1.9 2015/10/10 16:35:08 deraadt Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott @@ -1074,11 +1074,14 @@ pledge_ioctl_check(struct proc *p, long com, void *v) if (fp->f_type == DTYPE_VNODE && (vp->v_flag & VISTTY)) return (0); return (ENOTTY); - case TIOCGPGRP: - case TIOCGWINSZ: /* various programs */ #if notyet case TIOCSTI: /* ksh? csh? */ + if (fp->f_type == DTYPE_VNODE && (vp->v_flag & VISTTY)) + return (0); + break; #endif + case TIOCGPGRP: + case TIOCGWINSZ: /* various programs */ case TIOCSBRK: /* cu */ case TIOCCDTR: /* cu */ case TIOCSETA: /* cu, ... */ -- 2.20.1