aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fix-gnustack.c2
-rw-r--r--src/paxctl-ng.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/fix-gnustack.c b/src/fix-gnustack.c
index 15e23e0..03da236 100644
--- a/src/fix-gnustack.c
+++ b/src/fix-gnustack.c
@@ -99,7 +99,7 @@ main( int argc, char *argv[])
{
if((fd = open(f_name, O_RDWR)) < 0)
error(EXIT_FAILURE, 0, "open() fail.");
- if((elf = elf_begin(fd, ELF_C_RDWR_MMAP, NULL)) == NULL)
+ if((elf = elf_begin(fd, ELF_C_RDWR, NULL)) == NULL)
error(EXIT_FAILURE, 0, "elf_begin() fail: %s", elf_errmsg(elf_errno()));
}
else
diff --git a/src/paxctl-ng.c b/src/paxctl-ng.c
index 025ea24..4b7e6fb 100644
--- a/src/paxctl-ng.c
+++ b/src/paxctl-ng.c
@@ -216,7 +216,7 @@ get_pt_flags(int fd, int verbose)
return pt_flags;
}
- if((elf = elf_begin(fd, ELF_C_READ_MMAP, NULL)) == NULL)
+ if((elf = elf_begin(fd, ELF_C_READ, NULL)) == NULL)
{
if(verbose)
printf("\tELF ERROR: elf_begin() fail: %s\n", elf_errmsg(elf_errno()));
@@ -460,7 +460,7 @@ set_pt_flags(int fd, uint16_t pt_flags, int verbose)
return;
}
- if((elf = elf_begin(fd, ELF_C_RDWR_MMAP, NULL)) == NULL)
+ if((elf = elf_begin(fd, ELF_C_RDWR, NULL)) == NULL)
{
if(verbose)
printf("\tELF ERROR: elf_begin() fail: %s\n", elf_errmsg(elf_errno()));