summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_prot.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2011-04-04 13:00:13 +0000
committerguenther <guenther@openbsd.org>2011-04-04 13:00:13 +0000
commite2590abe40201cef18faa1b02199a205012c1ed6 (patch)
tree282df49f15e8acdc6470b883b5d503e3edb2721d /sys/kern/kern_prot.c
parentnuke o43statfs as it is unused. (diff)
downloadwireguard-openbsd-e2590abe40201cef18faa1b02199a205012c1ed6.tar.xz
wireguard-openbsd-e2590abe40201cef18faa1b02199a205012c1ed6.zip
Move P_EXEC flag from struct proc to process, so that setpgid() will
fail regardless of which rthread calls execve() ok blambert@
Diffstat (limited to 'sys/kern/kern_prot.c')
-rw-r--r--sys/kern/kern_prot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 5b058ee605b..7f451200606 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_prot.c,v 1.47 2011/04/02 17:04:35 guenther Exp $ */
+/* $OpenBSD: kern_prot.c,v 1.48 2011/04/04 13:00:13 guenther Exp $ */
/* $NetBSD: kern_prot.c,v 1.33 1996/02/09 18:59:42 christos Exp $ */
/*
@@ -284,7 +284,7 @@ sys_setpgid(struct proc *curp, void *v, register_t *retval)
error = EPERM;
goto out;
}
- if (targpr->ps_mainproc->p_flag & P_EXEC) {
+ if (targpr->ps_flags & PS_EXEC) {
error = EACCES;
goto out;
}