From: Michael Tremer Date: Sat, 9 Sep 2023 17:03:44 +0000 (+0000) Subject: file: Don't fail on non-implemented CF protection check X-Git-Tag: 0.9.29~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=32f68461f01143c2b31a123f51726111385b9048;p=pakfire.git file: Don't fail on non-implemented CF protection check See: #13084 - Implement CF protection check Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/file.c b/src/libpakfire/file.c index ea3e276cf..a07da888e 100644 --- a/src/libpakfire/file.c +++ b/src/libpakfire/file.c @@ -2656,6 +2656,12 @@ static int __pakfire_file_check_cf_protection_x86(struct pakfire_file* file, return 0; } +static int __pakfire_file_check_cf_protection_aarch64(struct pakfire_file* file, + const int endianess, const uint32_t type, const char* payload) { + # warning TODO + return 0; +} + static int pakfire_file_check_cf_protection_callback(struct pakfire_file* file, Elf* elf, const Elf_Scn* section, const GElf_Shdr* shdr, Elf_Data* data) { GElf_Ehdr ehdr = {}; @@ -2720,13 +2726,11 @@ static int pakfire_file_check_cf_protection_callback(struct pakfire_file* file, } switch (ehdr.e_machine) { -#if 0 case EM_AARCH64: r = __pakfire_file_check_cf_protection_aarch64(file, endianess, type, payload); if (r) return r; break; -#endif case EM_X86_64: r = __pakfire_file_check_cf_protection_x86(file, endianess, type, payload); @@ -2735,7 +2739,7 @@ static int pakfire_file_check_cf_protection_callback(struct pakfire_file* file, break; default: - ERROR(file->pakfire, "Unsupported ELF type\n"); + ERROR(file->pakfire, "Unsupported ELF type (%d)\n", ehdr.e_machine); return 1; }