diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-18 01:53:32 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-18 01:53:32 +0000 |
commit | 53e42bf5a8b8e0dfbd8ea3901a15a08d2c576eba (patch) | |
tree | 15cf90513a706453ed83ecbf99e457114e4f7317 /sys/kern/kern_pledge.c | |
parent | 127b8e9a10ba1bf8059616cfc5bb3aea0a7d0301 (diff) |
TIOCSTI and TIOCSCTTY; oops got the condition backwards.
Diffstat (limited to 'sys/kern/kern_pledge.c')
-rw-r--r-- | sys/kern/kern_pledge.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c index 5ae8213d589..3d1fa59be00 100644 --- a/sys/kern/kern_pledge.c +++ b/sys/kern/kern_pledge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_pledge.c,v 1.50 2015/10/18 01:07:19 doug Exp $ */ +/* $OpenBSD: kern_pledge.c,v 1.51 2015/10/18 01:53:31 deraadt Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org> @@ -1069,12 +1069,12 @@ pledge_ioctl_check(struct proc *p, long com, void *v) return (0); #endif /* NPTY > 0 */ case TIOCSTI: /* ksh? csh? */ - if ((p->p_p->ps_pledge & PLEDGE_PROC) == 0 && + if ((p->p_p->ps_pledge & PLEDGE_PROC) && fp->f_type == DTYPE_VNODE && (vp->v_flag & VISTTY)) return (0); break; case TIOCSCTTY: /* tmux etc */ - if ((p->p_p->ps_pledge & PLEDGE_ID) == 0 && + if ((p->p_p->ps_pledge & PLEDGE_ID) && fp->f_type == DTYPE_VNODE && (vp->v_flag & VISTTY)) return (0); break; |