From: Michael Tremer Date: Fri, 24 Mar 2023 09:41:16 +0000 (+0000) Subject: file: Whitelist libgcc_so.* and libmvec.so.* from SSP check X-Git-Tag: 0.9.29~222 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d776194115f1f224867a33c36c36153b048b4349;p=pakfire.git file: Whitelist libgcc_so.* and libmvec.so.* from SSP check libgcc_s.so cannot be built with SSP, at least it will create some problems linking start files later on. libmvec should generally not be on here, but all the assembly magic seems to confuse something so that it won't be linked okay. Fixes: #13069 Fixes: #13070 Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/file.c b/src/libpakfire/file.c index d375a9a75..f49e9a9ae 100644 --- a/src/libpakfire/file.c +++ b/src/libpakfire/file.c @@ -2109,6 +2109,13 @@ static int __pakfire_file_check_ssp( } static int pakfire_file_check_ssp(struct pakfire_file* file) { + // This check will be skipped for these files + static const char* whitelist[] = { + "/usr/lib64/libgcc_s.so.*", + "/usr/lib64/libmvec.so.*", + NULL, + }; + // Do not perform this check for runtime linkers if (pakfire_file_matches_class(file, PAKFIRE_FILE_RUNTIME_LINKER)) return 0; @@ -2117,6 +2124,15 @@ static int pakfire_file_check_ssp(struct pakfire_file* file) { if (file->issues & PAKFIRE_FILE_MISSING_DEBUGINFO) return 0; + // Check if this file is whitelisted + for (const char** path = whitelist; *path; path++) { + if (pakfire_file_matches(file, *path)) { + DEBUG(file->pakfire, "Skipping SSP check for whitelisted file %s\n", + pakfire_file_get_path(file)); + return 0; + } + } + return pakfire_file_open_elf(file, __pakfire_file_check_ssp, NULL); }