]> git.ipfire.org Git - pakfire.git/commitdiff
ELF: Actually return findings on the CF protection check
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 3 Jan 2025 17:52:09 +0000 (17:52 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 3 Jan 2025 17:52:09 +0000 (17:52 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/elf.c

index f3f2adf03d2b167f7cb1989d16c892f6becc4cef..3896a3752076766eee94f639d32a2fe852aba67c 100644 (file)
@@ -697,7 +697,7 @@ static int pakfire_elf_check_cf_protection_aarch64(struct pakfire_elf* self,
        if (!(property & GNU_PROPERTY_AARCH64_FEATURE_1_PAC))
                flags |= PAKFIRE_ELF_MISSING_PAC;
 
-       return 0;
+       return flags;
 }
 
 static int pakfire_elf_check_cf_protection_riscv64(struct pakfire_elf* self,
@@ -729,7 +729,7 @@ static int pakfire_elf_check_cf_protection_x86_64(struct pakfire_elf* self,
        if (!(property & GNU_PROPERTY_X86_FEATURE_1_SHSTK))
                flags |= PAKFIRE_ELF_MISSING_SHSTK;
 
-       return 0;
+       return flags;
 }
 
 static int pakfire_elf_check_cf_protection(struct pakfire_elf* self,