summaryrefslogtreecommitdiffstats
path: root/sys/kern/exec_elf.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2016-05-30 21:25:48 +0000
committerderaadt <deraadt@openbsd.org>2016-05-30 21:25:48 +0000
commit12b626657dbf8638f11edfe62f9c991b4c2b3c4d (patch)
treeeb9078f53494100e326e90647fca7167d775a7e2 /sys/kern/exec_elf.c
parent*** empty log message *** (diff)
downloadwireguard-openbsd-12b626657dbf8638f11edfe62f9c991b4c2b3c4d.tar.xz
wireguard-openbsd-12b626657dbf8638f11edfe62f9c991b4c2b3c4d.zip
backout to insert correct commit message
Diffstat (limited to 'sys/kern/exec_elf.c')
-rw-r--r--sys/kern/exec_elf.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c
index 61550fbec81..f0093ea45fd 100644
--- a/sys/kern/exec_elf.c
+++ b/sys/kern/exec_elf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_elf.c,v 1.122 2016/05/30 21:22:45 deraadt Exp $ */
+/* $OpenBSD: exec_elf.c,v 1.123 2016/05/30 21:25:48 deraadt Exp $ */
/*
* Copyright (c) 1996 Per Fogelstrom
@@ -76,7 +76,6 @@
#include <sys/namei.h>
#include <sys/vnode.h>
#include <sys/core.h>
-#include <sys/syslog.h>
#include <sys/exec.h>
#include <sys/exec_elf.h>
#include <sys/file.h>
@@ -881,23 +880,6 @@ ELFNAME(os_pt_note)(struct proc *p, struct exec_package *epp, Elf_Ehdr *eh,
goto out1;
for (ph = hph; ph < &hph[eh->e_phnum]; ph++) {
- if (ph->p_type == PT_OPENBSD_WXNEEDED) {
- int wxallowed = (epp->ep_vp->v_mount &&
- (epp->ep_vp->v_mount->mnt_flag & MNT_WXALLOWED));
-
- if (!wxallowed) {
- log(LOG_NOTICE,
- "%s(%d): W^X binary outside wxallowed mountpoint\n",
- epp->ep_name, p->p_pid);
- error = ENOEXEC;
- goto out1;
- }
- epp->ep_flags |= EXEC_WXNEEDED;
- break;
- }
- }
-
- for (ph = hph; ph < &hph[eh->e_phnum]; ph++) {
if (ph->p_type != PT_NOTE ||
ph->p_filesz > 1024 ||
ph->p_filesz < sizeof(Elf_Note) + name_size)