Change class PackLinuxI386elf : public PackLinuxI386
into class PackLinuxElf32x86 : public PackLinuxElf32Le : public PackLinuxElf32 which makes the code for compressing ELF (for direct-to-memory decompression) cleaner because ELF has some of the class tree to itself. This assumes PROT_EXEC|PROT_WRITE ought to work. This is checked at runtime, and if it fails then give a message on stderr and exit(127). Modify --force-execve so that runtime avoids PROT_EXEC|PROT_WRITE. Then executables compressed with --force-execve will run under PaX, grSecurity, and strict SELinux.
This commit is contained in:
+2
-2
@@ -212,14 +212,14 @@ static Packer* try_packers(InputFile *f, try_function func)
|
||||
}
|
||||
#endif
|
||||
if (opt->o_unix.use_ptinterp) {
|
||||
if ((p = func(new PackLinuxI386interp(f),f)) != NULL)
|
||||
if ((p = func(new PackLinuxElf32x86interp(f),f)) != NULL)
|
||||
return p;
|
||||
}
|
||||
if ((p = func(new PackLinuxElf64amd(f),f)) != NULL)
|
||||
return p;
|
||||
if ((p = func(new PackLinuxElf32ppc(f),f)) != NULL)
|
||||
return p;
|
||||
if ((p = func(new PackLinuxI386elf(f),f)) != NULL)
|
||||
if ((p = func(new PackLinuxElf32x86(f),f)) != NULL)
|
||||
return p;
|
||||
if ((p = func(new PackLinuxI386sh(f),f)) != NULL)
|
||||
return p;
|
||||
|
||||
Reference in New Issue
Block a user