From 195eedf69e5d695177b93d14ed32374b43cd681c Mon Sep 17 00:00:00 2001 From: deraadt Date: Fri, 16 Oct 2015 14:00:37 +0000 Subject: [PATCH] Place TIOCSTI reminder block better --- sys/kern/kern_pledge.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c index 511378a8ef9..ee0c65ce503 100644 --- a/sys/kern/kern_pledge.c +++ b/sys/kern/kern_pledge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_pledge.c,v 1.34 2015/10/16 13:59:58 deraadt Exp $ */ +/* $OpenBSD: kern_pledge.c,v 1.35 2015/10/16 14:00:37 deraadt Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott @@ -1075,6 +1075,12 @@ pledge_ioctl_check(struct proc *p, long com, void *v) if ((p->p_p->ps_pledge & PLEDGE_TTY)) { switch (com) { +#if notyet + case TIOCSTI: /* ksh? csh? */ + if (fp->f_type == DTYPE_VNODE && (vp->v_flag & VISTTY)) + return (0); + break; +#endif case TIOCSPGRP: if ((p->p_p->ps_pledge & PLEDGE_PROC) == 0) break; @@ -1085,12 +1091,6 @@ pledge_ioctl_check(struct proc *p, long com, void *v) if (fp->f_type == DTYPE_VNODE && (vp->v_flag & VISTTY)) return (0); return (ENOTTY); -#if notyet - case TIOCSTI: /* ksh? csh? */ - if (fp->f_type == DTYPE_VNODE && (vp->v_flag & VISTTY)) - return (0); - break; -#endif case TIOCSWINSZ: case TIOCCBRK: /* cu */ case TIOCSBRK: /* cu */ -- 2.20.1