From b9d6112faf35f4cc5d204ebfc255dc4e38efbc20 Mon Sep 17 00:00:00 2001 From: Jeremie Courreges-Anglas Date: Sat, 3 Sep 2016 14:29:06 +0000 Subject: Inherit PS_WXNEEDED in forked processes. Issue noticed when debugging lang/sbcl. ok deraadt@ guenther@ tedu@ --- sys/kern/kern_fork.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/kern') diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 8f71c6188f9..de299003ff7 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_fork.c,v 1.188 2016/08/31 14:15:07 tom Exp $ */ +/* $OpenBSD: kern_fork.c,v 1.189 2016/09/03 14:29:05 jca Exp $ */ /* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */ /* @@ -201,7 +201,8 @@ process_new(struct proc *p, struct process *parent, int flags) if (pr->ps_textvp) vref(pr->ps_textvp); - pr->ps_flags = parent->ps_flags & (PS_SUGID | PS_SUGIDEXEC | PS_PLEDGE); + pr->ps_flags = parent->ps_flags & + (PS_SUGID | PS_SUGIDEXEC | PS_PLEDGE | PS_WXNEEDED); if (parent->ps_session->s_ttyvp != NULL) pr->ps_flags |= parent->ps_flags & PS_CONTROLT; -- cgit v1.2.3