aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2011-10-17 16:55:00 -0400
committerAnthony G. Basile <blueness@gentoo.org>2011-10-17 16:55:00 -0400
commit0552fd71e796816c4ccf383b05a2592d9c0a7e1e (patch)
tree357a2a2f9ebe915e10aee4393ad61caf31b565e5
parentscripts/revdep-pax: extend setting flags to reverse mappings (diff)
downloadelfix-0552fd71e796816c4ccf383b05a2592d9c0a7e1e.tar.gz
elfix-0552fd71e796816c4ccf383b05a2592d9c0a7e1e.tar.bz2
elfix-0552fd71e796816c4ccf383b05a2592d9c0a7e1e.zip
scripts/{paxmodule.c,revdep-pax}: removed EI_PAX markings, bug #387459
-rw-r--r--scripts/paxmodule.c18
-rwxr-xr-xscripts/revdep-pax2
2 files changed, 18 insertions, 2 deletions
diff --git a/scripts/paxmodule.c b/scripts/paxmodule.c
index 32c8768..45e9f26 100644
--- a/scripts/paxmodule.c
+++ b/scripts/paxmodule.c
@@ -9,6 +9,7 @@
#include <fcntl.h>
#include <unistd.h>
+/* Gentoo bug #387459
#define HF_PAX_PAGEEXEC 1
#define HF_PAX_EMUTRAMP 2
@@ -18,6 +19,7 @@
#define HF_PAX_SEGMEXEC 32
#define EI_PAX 14 // Index to read the PaX flags into ELF header e_ident[] array
+*/
#define BUF_SIZE 7 //Buffer for holding human readable flags
@@ -58,7 +60,9 @@ pax_getflags(PyObject *self, PyObject *args)
char pax_buf[BUF_SIZE];
uint16_t pax_flags;
- GElf_Ehdr ehdr;
+ /* Gentoo bug #387459
+ GElf_Ehdr ehdr;
+ */
GElf_Phdr phdr;
char found_pt_pax;
size_t i, phnum;
@@ -140,6 +144,12 @@ pax_getflags(PyObject *self, PyObject *args)
if(!found_pt_pax)
{
+ //Set to the strictest possible
+ }
+
+ /* Gentoo bug #387459
+ if(!found_pt_pax)
+ {
if(gelf_getehdr(elf, &ehdr) != &ehdr)
{
elf_end(elf);
@@ -157,6 +167,7 @@ pax_getflags(PyObject *self, PyObject *args)
pax_buf[4] = pax_flags & HF_PAX_RANDMMAP ? 'r' : 'R';
pax_buf[5] = pax_flags & HF_PAX_RANDEXEC ? 'X' : 'x';
}
+ */
elf_end(elf);
close(fd);
@@ -174,8 +185,10 @@ pax_setflags(PyObject *self, PyObject *args)
Elf *elf;
+ /* Gentoo bug #387459
GElf_Ehdr ehdr;
uint16_t ei_flags;
+ */
GElf_Phdr phdr;
size_t i, phnum;
@@ -213,6 +226,8 @@ pax_setflags(PyObject *self, PyObject *args)
return NULL;
}
+ /* Gentoo bug #387459
+
if(gelf_getehdr(elf, &ehdr) != &ehdr)
{
elf_end(elf);
@@ -276,6 +291,7 @@ pax_setflags(PyObject *self, PyObject *args)
PyErr_SetString(PaxError, "pax_setflags: gelf_update_ehdr() failed");
return NULL;
}
+ */
elf_getphdrnum(elf, &phnum);
diff --git a/scripts/revdep-pax b/scripts/revdep-pax
index a5636bd..59b8b4e 100755
--- a/scripts/revdep-pax
+++ b/scripts/revdep-pax
@@ -314,7 +314,7 @@ def run_soname(name, verbose, use_soname, mark):
except:
print 'cannot obtain pax flags for %s' % binary
- if len(mismatched_binaries) == 0
+ if len(mismatched_binaries) == 0:
print
print '\tNo mismatches'
print