aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2012-07-27 18:01:19 -0400
committerAnthony G. Basile <blueness@gentoo.org>2012-07-27 18:33:28 -0400
commit615eea5537d277f217ad7ab68c60e58613f85691 (patch)
treeb993d220e376e2b2d8c244a2b96972db15e0480c
parentRevert "src/{fix-gnustack.c,paxctl-ng.c}: ELF_C_RDWR_MMAP -> ELF_C_RDWR for u... (diff)
downloadelfix-615eea5537d277f217ad7ab68c60e58613f85691.tar.gz
elfix-615eea5537d277f217ad7ab68c60e58613f85691.tar.bz2
elfix-615eea5537d277f217ad7ab68c60e58613f85691.zip
Revert "scripts/paxmodule.c: ELF_C_RDWR_MMAP -> ELF_C_RDWR for uclibc compat"
This reverts commit 184b349113189aee285ff9bcb1ca08235a5c29c6. Using libelf instead of elfutils to gelf_update_phdr() fails. Revert for now until we figure out what's going on. (cherry picked from commit 47ef483afe7bd19f2b8a9ef77b36b8887ad98518)
-rw-r--r--scripts/paxmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/paxmodule.c b/scripts/paxmodule.c
index 4a08522..c3dfc28 100644
--- a/scripts/paxmodule.c
+++ b/scripts/paxmodule.c
@@ -110,7 +110,7 @@ get_pt_flags(int fd)
return pt_flags;
}
- if((elf = elf_begin(fd, ELF_C_READ, NULL)) == NULL)
+ if((elf = elf_begin(fd, ELF_C_READ_MMAP, NULL)) == NULL)
{
PyErr_SetString(PaxError, "get_pt_flags: elf_begin() failed");
return pt_flags;
@@ -275,7 +275,7 @@ set_pt_flags(int fd, uint16_t pt_flags)
return;
}
- if((elf = elf_begin(fd, ELF_C_RDWR, NULL)) == NULL)
+ if((elf = elf_begin(fd, ELF_C_RDWR_MMAP, NULL)) == NULL)
{
PyErr_SetString(PaxError, "set_pt_flags: elf_begin() failed");
return;