]> git.ipfire.org Git - pakfire.git/commitdiff
file: Remove PIE code that was moved into the linter
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 25 Oct 2024 16:57:50 +0000 (16:57 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 25 Oct 2024 16:57:50 +0000 (16:57 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/file.c
src/libpakfire/include/pakfire/file.h

index 5693c988fc1174e412d818ae58fcd4e58e347588..af129bb8d7240e7119a6fe014b4cfa0c72984991 100644 (file)
@@ -759,13 +759,6 @@ char* pakfire_file_dump(struct pakfire_file* file, int flags) {
                                goto ERROR;
                }
 
-               // Position-independent Executable
-               if (file->issues & PAKFIRE_FILE_MISSING_PIE) {
-                       r = asprintf(&buffer, "%s [MISSING-PIE]", buffer);
-                       if (r < 0)
-                               goto ERROR;
-               }
-
                // Executable Stack
                if (file->issues & PAKFIRE_FILE_EXECSTACK) {
                        r = asprintf(&buffer, "%s [EXECSTACK]", buffer);
@@ -2124,21 +2117,6 @@ static int pakfire_file_check_ssp(struct pakfire_file* file) {
        return pakfire_file_open_elf(file, __pakfire_file_check_ssp, NULL);
 }
 
-static int pakfire_file_check_pie(struct pakfire_file* file) {
-       switch (pakfire_file_get_elf_type(file)) {
-               // Shared Object files are good
-               case ET_DYN:
-                       break;
-
-               // Everything else is bad
-               default:
-                       file->issues |= PAKFIRE_FILE_MISSING_PIE;
-                       break;
-       }
-
-       return 0;
-}
-
 static int __pakfire_file_check_execstack(
                struct pakfire_file* file, Elf* elf, void* data) {
        GElf_Phdr phdr;
@@ -2855,11 +2833,6 @@ int pakfire_file_check(struct pakfire_file* file, int* issues) {
                        if (r)
                                return r;
 
-                       // Check for PIE
-                       r = pakfire_file_check_pie(file);
-                       if (r)
-                               return r;
-
                        // Check for executable stacks
                        r = pakfire_file_check_execstack(file);
                        if (r)
index f03744e9a5b97a9cbe79c2433ec24b822fe1f4e4..326fd4d3c1552342d589a78f36370a9d2e35e153 100644 (file)
@@ -189,7 +189,6 @@ enum pakfire_file_check_issues {
        PAKFIRE_FILE_FHS_ERROR           = (1 << 0),
        PAKFIRE_FILE_MISSING_DEBUGINFO   = (1 << 1),
        PAKFIRE_FILE_MISSING_SSP         = (1 << 2),
-       PAKFIRE_FILE_MISSING_PIE         = (1 << 3),
        PAKFIRE_FILE_EXECSTACK           = (1 << 4),
        PAKFIRE_FILE_NO_RELRO            = (1 << 5),
        PAKFIRE_FILE_HAS_RUNPATH         = (1 << 6),