From ff33c8f87dc8188c0562d348cf4f081609f45455 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Fri, 23 May 2025 11:49:31 +0200 Subject: [PATCH] Extend test-dlopen-so to also cover cases when built without support Let's make things more consistent and have all dlopen_xxx() functions return EOPNOTSUPP on failure and verify this behavior in test-dlopen-so. --- src/basic/compress.c | 18 ++-- src/basic/compress.h | 8 -- src/basic/gcrypt-util.c | 16 +++- src/basic/gcrypt-util.h | 6 +- src/shared/elf-util.c | 12 +++ src/shared/elf-util.h | 2 - src/shared/libfido2-util.c | 8 ++ src/shared/libfido2-util.h | 4 +- src/shared/password-quality-util-passwdqc.c | 38 ++++---- src/shared/password-quality-util-passwdqc.h | 4 +- src/shared/password-quality-util-pwquality.c | 41 +++++---- src/shared/password-quality-util-pwquality.h | 4 +- src/shared/qrcode-util.c | 16 +++- src/shared/qrcode-util.h | 18 +--- src/shared/tpm2-util.c | 8 ++ src/shared/tpm2-util.h | 4 +- src/test/test-dlopen-so.c | 94 +++++--------------- 17 files changed, 147 insertions(+), 154 deletions(-) diff --git a/src/basic/compress.c b/src/basic/compress.c index 7cb12988dc4..40bf6d4cbea 100644 --- a/src/basic/compress.c +++ b/src/basic/compress.c @@ -144,8 +144,8 @@ bool compression_supported(Compression c) { return BIT_SET(supported, c); } -#if HAVE_XZ int dlopen_lzma(void) { +#if HAVE_XZ ELF_NOTE_DLOPEN("lzma", "Support lzma compression in journal and coredump files", COMPRESSION_PRIORITY_XZ, @@ -160,8 +160,10 @@ int dlopen_lzma(void) { DLSYM_ARG(lzma_stream_buffer_encode), DLSYM_ARG(lzma_lzma_preset), DLSYM_ARG(lzma_stream_decoder)); -} +#else + return -EOPNOTSUPP; #endif +} int compress_blob_xz(const void *src, uint64_t src_size, void *dst, size_t dst_alloc_size, size_t *dst_size, int level) { @@ -213,8 +215,8 @@ int compress_blob_xz(const void *src, uint64_t src_size, #endif } -#if HAVE_LZ4 int dlopen_lz4(void) { +#if HAVE_LZ4 ELF_NOTE_DLOPEN("lz4", "Support lz4 compression in journal and coredump files", COMPRESSION_PRIORITY_LZ4, @@ -238,8 +240,10 @@ int dlopen_lz4(void) { DLSYM_ARG(LZ4_decompress_safe), DLSYM_ARG(LZ4_decompress_safe_partial), DLSYM_ARG(LZ4_versionNumber)); -} +#else + return -EOPNOTSUPP; #endif +} int compress_blob_lz4(const void *src, uint64_t src_size, void *dst, size_t dst_alloc_size, size_t *dst_size, int level) { @@ -278,8 +282,8 @@ int compress_blob_lz4(const void *src, uint64_t src_size, #endif } -#if HAVE_ZSTD int dlopen_zstd(void) { +#if HAVE_ZSTD ELF_NOTE_DLOPEN("zstd", "Support zstd compression in journal and coredump files", COMPRESSION_PRIORITY_ZSTD, @@ -304,8 +308,10 @@ int dlopen_zstd(void) { DLSYM_ARG(ZSTD_isError), DLSYM_ARG(ZSTD_createDCtx), DLSYM_ARG(ZSTD_createCCtx)); -} +#else + return -EOPNOTSUPP; #endif +} int compress_blob_zstd( const void *src, uint64_t src_size, diff --git a/src/basic/compress.h b/src/basic/compress.h index ce662920eb7..dcd0e4a7342 100644 --- a/src/basic/compress.h +++ b/src/basic/compress.h @@ -62,17 +62,9 @@ int decompress_stream_xz(int fdf, int fdt, uint64_t max_size); int decompress_stream_lz4(int fdf, int fdt, uint64_t max_size); int decompress_stream_zstd(int fdf, int fdt, uint64_t max_size); -#if HAVE_LZ4 int dlopen_lz4(void); -#endif - -#if HAVE_ZSTD int dlopen_zstd(void); -#endif - -#if HAVE_XZ int dlopen_lzma(void); -#endif static inline int compress_blob( Compression compression, diff --git a/src/basic/gcrypt-util.c b/src/basic/gcrypt-util.c index bd73621c6fe..ebbc3e33bc7 100644 --- a/src/basic/gcrypt-util.c +++ b/src/basic/gcrypt-util.c @@ -1,11 +1,11 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ -#if HAVE_GCRYPT - #include #include "gcrypt-util.h" +#if HAVE_GCRYPT + static void *gcrypt_dl = NULL; static DLSYM_PROTOTYPE(gcry_control) = NULL; @@ -40,8 +40,10 @@ DLSYM_PROTOTYPE(gcry_mpi_sub_ui) = NULL; DLSYM_PROTOTYPE(gcry_prime_check) = NULL; DLSYM_PROTOTYPE(gcry_randomize) = NULL; DLSYM_PROTOTYPE(gcry_strerror) = NULL; +#endif -static int dlopen_gcrypt(void) { +int dlopen_gcrypt(void) { +#if HAVE_GCRYPT ELF_NOTE_DLOPEN("gcrypt", "Support for journald forward-sealing", ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED, @@ -82,9 +84,13 @@ static int dlopen_gcrypt(void) { DLSYM_ARG(gcry_prime_check), DLSYM_ARG(gcry_randomize), DLSYM_ARG(gcry_strerror)); +#else + return -EOPNOTSUPP; +#endif } int initialize_libgcrypt(bool secmem) { +#if HAVE_GCRYPT int r; r = dlopen_gcrypt(); @@ -105,5 +111,7 @@ int initialize_libgcrypt(bool secmem) { sym_gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); return 0; -} +#else + return -EOPNOTSUPP; #endif +} diff --git a/src/basic/gcrypt-util.h b/src/basic/gcrypt-util.h index 83e32babb55..9fab3500a53 100644 --- a/src/basic/gcrypt-util.h +++ b/src/basic/gcrypt-util.h @@ -4,6 +4,10 @@ #include "forward.h" +int dlopen_gcrypt(void); + +int initialize_libgcrypt(bool secmem); + #if HAVE_GCRYPT #include /* IWYU pragma: export */ @@ -40,8 +44,6 @@ extern DLSYM_PROTOTYPE(gcry_prime_check); extern DLSYM_PROTOTYPE(gcry_randomize); extern DLSYM_PROTOTYPE(gcry_strerror); -int initialize_libgcrypt(bool secmem); - /* Copied from gcry_md_putc from gcrypt.h due to the need to call the sym_ variant */ #define sym_gcry_md_putc(h,c) \ do { \ diff --git a/src/shared/elf-util.c b/src/shared/elf-util.c index a21167980d0..78f8af5b070 100644 --- a/src/shared/elf-util.c +++ b/src/shared/elf-util.c @@ -89,7 +89,10 @@ static DLSYM_PROTOTYPE(elf_version) = NULL; static DLSYM_PROTOTYPE(gelf_getphdr) = NULL; static DLSYM_PROTOTYPE(gelf_getnote) = NULL; +#endif + int dlopen_dw(void) { +#if HAVE_ELFUTILS int r; ELF_NOTE_DLOPEN("dw", @@ -138,9 +141,13 @@ int dlopen_dw(void) { return r; return 1; +#else + return -EOPNOTSUPP; +#endif } int dlopen_elf(void) { +#if HAVE_ELFUTILS int r; ELF_NOTE_DLOPEN("elf", @@ -165,8 +172,13 @@ int dlopen_elf(void) { return r; return 1; +#else + return -EOPNOTSUPP; +#endif } +#if HAVE_ELFUTILS + typedef struct StackContext { MemStream m; Dwfl *dwfl; diff --git a/src/shared/elf-util.h b/src/shared/elf-util.h index 2a3251c28b0..41859cd169d 100644 --- a/src/shared/elf-util.h +++ b/src/shared/elf-util.h @@ -3,10 +3,8 @@ #include "forward.h" -#if HAVE_ELFUTILS int dlopen_dw(void); int dlopen_elf(void); -#endif /* Parse an ELF object in a forked process, so that errors while iterating over * untrusted and potentially malicious data do not propagate to the main caller's process. diff --git a/src/shared/libfido2-util.c b/src/shared/libfido2-util.c index 0cc64c8674e..a4317971e19 100644 --- a/src/shared/libfido2-util.c +++ b/src/shared/libfido2-util.c @@ -71,7 +71,10 @@ static void fido_log_propagate_handler(const char *s) { log_debug("libfido2: %s", strempty(s)); } +#endif + int dlopen_libfido2(void) { +#if HAVE_LIBFIDO2 int r; ELF_NOTE_DLOPEN("fido2", @@ -136,8 +139,13 @@ int dlopen_libfido2(void) { sym_fido_set_log_handler(fido_log_propagate_handler); return 0; +#else + return -EOPNOTSUPP; +#endif } +#if HAVE_LIBFIDO2 + static int verify_features( fido_dev_t *d, const char *path, diff --git a/src/shared/libfido2-util.h b/src/shared/libfido2-util.h index dbb4f1fc922..c39cf73160f 100644 --- a/src/shared/libfido2-util.h +++ b/src/shared/libfido2-util.h @@ -16,6 +16,8 @@ typedef enum Fido2EnrollFlags { _FIDO2ENROLL_TYPE_INVALID = -EINVAL, } Fido2EnrollFlags; +int dlopen_libfido2(void); + #if HAVE_LIBFIDO2 #include @@ -70,8 +72,6 @@ extern DLSYM_PROTOTYPE(fido_init); extern DLSYM_PROTOTYPE(fido_set_log_handler); extern DLSYM_PROTOTYPE(fido_strerr); -int dlopen_libfido2(void); - static inline void fido_cbor_info_free_wrapper(fido_cbor_info_t **p) { if (*p) sym_fido_cbor_info_free(p); diff --git a/src/shared/password-quality-util-passwdqc.c b/src/shared/password-quality-util-passwdqc.c index f4ecc6ce66d..d74e0fb7f23 100644 --- a/src/shared/password-quality-util-passwdqc.c +++ b/src/shared/password-quality-util-passwdqc.c @@ -4,7 +4,7 @@ #include "errno-util.h" #include "log.h" #include "memory-util.h" -#include "password-quality-util.h" +#include "password-quality-util-passwdqc.h" #include "strv.h" #if HAVE_PASSWDQC @@ -18,22 +18,6 @@ DLSYM_PROTOTYPE(passwdqc_params_free) = NULL; DLSYM_PROTOTYPE(passwdqc_check) = NULL; DLSYM_PROTOTYPE(passwdqc_random) = NULL; -int dlopen_passwdqc(void) { - ELF_NOTE_DLOPEN("passwdqc", - "Support for password quality checks", - ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED, - "libpasswdqc.so.1"); - - return dlopen_many_sym_or_warn( - &passwdqc_dl, "libpasswdqc.so.1", LOG_DEBUG, - DLSYM_ARG(passwdqc_params_reset), - DLSYM_ARG(passwdqc_params_load), - DLSYM_ARG(passwdqc_params_parse), - DLSYM_ARG(passwdqc_params_free), - DLSYM_ARG(passwdqc_check), - DLSYM_ARG(passwdqc_random)); -} - static int pwqc_allocate_context(passwdqc_params_t **ret) { _cleanup_(sym_passwdqc_params_freep) passwdqc_params_t *params = NULL; @@ -144,3 +128,23 @@ int check_password_quality( } #endif + +int dlopen_passwdqc(void) { +#if HAVE_PASSWDQC + ELF_NOTE_DLOPEN("passwdqc", + "Support for password quality checks", + ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED, + "libpasswdqc.so.1"); + + return dlopen_many_sym_or_warn( + &passwdqc_dl, "libpasswdqc.so.1", LOG_DEBUG, + DLSYM_ARG(passwdqc_params_reset), + DLSYM_ARG(passwdqc_params_load), + DLSYM_ARG(passwdqc_params_parse), + DLSYM_ARG(passwdqc_params_free), + DLSYM_ARG(passwdqc_check), + DLSYM_ARG(passwdqc_random)); +#else + return -EOPNOTSUPP; +#endif +} diff --git a/src/shared/password-quality-util-passwdqc.h b/src/shared/password-quality-util-passwdqc.h index 121b75c5019..bda3be544ce 100644 --- a/src/shared/password-quality-util-passwdqc.h +++ b/src/shared/password-quality-util-passwdqc.h @@ -15,11 +15,11 @@ extern DLSYM_PROTOTYPE(passwdqc_params_free); extern DLSYM_PROTOTYPE(passwdqc_check); extern DLSYM_PROTOTYPE(passwdqc_random); -int dlopen_passwdqc(void); - DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(passwdqc_params_t*, sym_passwdqc_params_free, NULL); int suggest_passwords(void); int check_password_quality(const char *password, const char *old, const char *username, char **ret_error); #endif + +int dlopen_passwdqc(void); diff --git a/src/shared/password-quality-util-pwquality.c b/src/shared/password-quality-util-pwquality.c index ac46ac8430e..49ea7d2fe2f 100644 --- a/src/shared/password-quality-util-pwquality.c +++ b/src/shared/password-quality-util-pwquality.c @@ -8,6 +8,7 @@ #include "errno-util.h" #include "log.h" #include "password-quality-util.h" +#include "password-quality-util-pwquality.h" #include "string-util.h" #include "strv.h" @@ -24,24 +25,6 @@ DLSYM_PROTOTYPE(pwquality_read_config) = NULL; DLSYM_PROTOTYPE(pwquality_set_int_value) = NULL; DLSYM_PROTOTYPE(pwquality_strerror) = NULL; -int dlopen_pwquality(void) { - ELF_NOTE_DLOPEN("pwquality", - "Support for password quality checks", - ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED, - "libpwquality.so.1"); - - return dlopen_many_sym_or_warn( - &pwquality_dl, "libpwquality.so.1", LOG_DEBUG, - DLSYM_ARG(pwquality_check), - DLSYM_ARG(pwquality_default_settings), - DLSYM_ARG(pwquality_free_settings), - DLSYM_ARG(pwquality_generate), - DLSYM_ARG(pwquality_get_str_value), - DLSYM_ARG(pwquality_read_config), - DLSYM_ARG(pwquality_set_int_value), - DLSYM_ARG(pwquality_strerror)); -} - static void pwq_maybe_disable_dictionary(pwquality_settings_t *pwq) { char buf[PWQ_MAX_ERROR_MESSAGE_LEN]; const char *path; @@ -163,3 +146,25 @@ int check_password_quality(const char *password, const char *old, const char *us } #endif + +int dlopen_pwquality(void) { +#if HAVE_PWQUALITY + ELF_NOTE_DLOPEN("pwquality", + "Support for password quality checks", + ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED, + "libpwquality.so.1"); + + return dlopen_many_sym_or_warn( + &pwquality_dl, "libpwquality.so.1", LOG_DEBUG, + DLSYM_ARG(pwquality_check), + DLSYM_ARG(pwquality_default_settings), + DLSYM_ARG(pwquality_free_settings), + DLSYM_ARG(pwquality_generate), + DLSYM_ARG(pwquality_get_str_value), + DLSYM_ARG(pwquality_read_config), + DLSYM_ARG(pwquality_set_int_value), + DLSYM_ARG(pwquality_strerror)); +#else + return -EOPNOTSUPP; +#endif +} diff --git a/src/shared/password-quality-util-pwquality.h b/src/shared/password-quality-util-pwquality.h index dbea6d24cad..0d12c76ad7b 100644 --- a/src/shared/password-quality-util-pwquality.h +++ b/src/shared/password-quality-util-pwquality.h @@ -17,11 +17,11 @@ extern DLSYM_PROTOTYPE(pwquality_read_config); extern DLSYM_PROTOTYPE(pwquality_set_int_value); extern DLSYM_PROTOTYPE(pwquality_strerror); -int dlopen_pwquality(void); - DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(pwquality_settings_t*, sym_pwquality_free_settings, NULL); int suggest_passwords(void); int check_password_quality(const char *password, const char *old, const char *username, char **ret_error); #endif + +int dlopen_pwquality(void); diff --git a/src/shared/qrcode-util.c b/src/shared/qrcode-util.c index 5e61e84a9e2..43ef871e74c 100644 --- a/src/shared/qrcode-util.c +++ b/src/shared/qrcode-util.c @@ -4,6 +4,7 @@ #if HAVE_QRENCODE #include +#endif #include #include "ansi-color.h" @@ -18,12 +19,15 @@ #define UNICODE_LOWER_HALF_BLOCK UTF8("▄") #define UNICODE_UPPER_HALF_BLOCK UTF8("▀") +#if HAVE_QRENCODE static void *qrcode_dl = NULL; static DLSYM_PROTOTYPE(QRcode_encodeString) = NULL; static DLSYM_PROTOTYPE(QRcode_free) = NULL; +#endif int dlopen_qrencode(void) { +#if HAVE_QRENCODE int r; ELF_NOTE_DLOPEN("qrencode", @@ -41,8 +45,13 @@ int dlopen_qrencode(void) { } return r; +#else + return -EOPNOTSUPP; +#endif } +#if HAVE_QRENCODE + static void print_border(FILE *output, unsigned width, unsigned row, unsigned column) { assert(output); assert(width); @@ -176,6 +185,8 @@ static void write_qrcode(FILE *output, QRcode *qr, unsigned row, unsigned column DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(QRcode*, sym_QRcode_free, NULL); +#endif + int print_qrcode_full( FILE *out, const char *header, @@ -186,6 +197,7 @@ int print_qrcode_full( unsigned tty_height, bool check_tty) { +#if HAVE_QRENCODE int r; /* If this is not a UTF-8 system or ANSI colors aren't supported/disabled don't print any QR @@ -235,5 +247,7 @@ int print_qrcode_full( fputc('\n', out); return 0; -} +#else + return -EOPNOTSUPP; #endif +} diff --git a/src/shared/qrcode-util.h b/src/shared/qrcode-util.h index 7c9bb498931..a635810bfe3 100644 --- a/src/shared/qrcode-util.h +++ b/src/shared/qrcode-util.h @@ -3,9 +3,6 @@ #include "forward.h" -#if HAVE_QRENCODE -int dlopen_qrencode(void); - int print_qrcode_full( FILE *out, const char *header, @@ -15,19 +12,8 @@ int print_qrcode_full( unsigned tty_width, unsigned tty_height, bool check_tty); -#else -static inline int print_qrcode_full( - FILE *out, - const char *header, - const char *string, - unsigned row, - unsigned column, - unsigned tty_width, - unsigned tty_height, - bool check_tty) { - return -EOPNOTSUPP; -} -#endif + +int dlopen_qrencode(void); static inline int print_qrcode(FILE *out, const char *header, const char *string) { return print_qrcode_full(out, header, string, UINT_MAX, UINT_MAX, UINT_MAX, UINT_MAX, true); diff --git a/src/shared/tpm2-util.c b/src/shared/tpm2-util.c index 57e7a91f933..de1c56a84ee 100644 --- a/src/shared/tpm2-util.c +++ b/src/shared/tpm2-util.c @@ -217,7 +217,10 @@ static int dlopen_tpm2_mu(void) { DLSYM_ARG(Tss2_MU_UINT32_Marshal)); } +#endif + int dlopen_tpm2(void) { +#if HAVE_TPM2 int r; r = dlopen_tpm2_esys(); @@ -233,8 +236,13 @@ int dlopen_tpm2(void) { return r; return 0; +#else + return -EOPNOTSUPP; +#endif } +#if HAVE_TPM2 + void Esys_Freep(void *p) { assert(p); diff --git a/src/shared/tpm2-util.h b/src/shared/tpm2-util.h index 3205ac446fa..57674133bf2 100644 --- a/src/shared/tpm2-util.h +++ b/src/shared/tpm2-util.h @@ -39,14 +39,14 @@ static inline bool TPM2_PCR_MASK_VALID(uint32_t pcr_mask) { #define TPM2_N_HASH_ALGORITHMS 4U +int dlopen_tpm2(void); + #if HAVE_TPM2 #include /* IWYU pragma: export */ #include /* IWYU pragma: export */ #include /* IWYU pragma: export */ -int dlopen_tpm2(void); - typedef struct Tpm2Context { unsigned n_ref; diff --git a/src/test/test-dlopen-so.c b/src/test/test-dlopen-so.c index 97bb3be8853..870b2a67f89 100644 --- a/src/test/test-dlopen-so.c +++ b/src/test/test-dlopen-so.c @@ -19,6 +19,9 @@ #include "tests.h" #include "tpm2-util.h" +#define ASSERT_DLOPEN(func, cond) \ + cond ? ASSERT_OK(func()) : ASSERT_ERROR(func(), EOPNOTSUPP) + static int run(int argc, char **argv) { test_setup_logging(LOG_DEBUG); @@ -26,78 +29,25 @@ static int run(int argc, char **argv) { * where .so versions change and distributions update, but systemd doesn't have the new so names * around yet. */ -#if HAVE_LIBIDN2 || HAVE_LIBIDN - assert_se(dlopen_idn() >= 0); -#endif - -#if HAVE_LIBCRYPTSETUP - assert_se(dlopen_cryptsetup() >= 0); -#endif - -#if HAVE_PASSWDQC - assert_se(dlopen_passwdqc() >= 0); -#endif - -#if HAVE_PWQUALITY - assert_se(dlopen_pwquality() >= 0); -#endif - -#if HAVE_QRENCODE - assert_se(dlopen_qrencode() >= 0); -#endif - -#if HAVE_TPM2 - assert_se(dlopen_tpm2() >= 0); -#endif - -#if HAVE_LIBFIDO2 - assert_se(dlopen_libfido2() >= 0); -#endif - -#if HAVE_LIBBPF - assert_se(dlopen_bpf() >= 0); -#endif - -#if HAVE_ELFUTILS - assert_se(dlopen_dw() >= 0); - assert_se(dlopen_elf() >= 0); -#endif - -#if HAVE_PCRE2 - assert_se(dlopen_pcre2() >= 0); -#endif - -#if HAVE_P11KIT - assert_se(dlopen_p11kit() >= 0); -#endif - -#if HAVE_LIBARCHIVE - assert_se(dlopen_libarchive() >= 0); -#endif - -#if HAVE_LZ4 - assert_se(dlopen_lz4() >= 0); -#endif - -#if HAVE_ZSTD - assert_se(dlopen_zstd() >= 0); -#endif - -#if HAVE_XZ - assert_se(dlopen_lzma() >= 0); -#endif - -#if HAVE_GCRYPT - assert_se(initialize_libgcrypt(/* secmem= */ false) >= 0); -#endif - -#if HAVE_KMOD - assert_se(dlopen_libkmod() >= 0); -#endif - -#if HAVE_APPARMOR - assert_se(dlopen_libapparmor() >= 0); -#endif + ASSERT_DLOPEN(dlopen_idn, HAVE_LIBIDN2 || HAVE_LIBIDN); + ASSERT_DLOPEN(dlopen_cryptsetup, HAVE_LIBCRYPTSETUP); + ASSERT_DLOPEN(dlopen_passwdqc, HAVE_PASSWDQC); + ASSERT_DLOPEN(dlopen_pwquality, HAVE_PWQUALITY); + ASSERT_DLOPEN(dlopen_qrencode, HAVE_QRENCODE); + ASSERT_DLOPEN(dlopen_tpm2, HAVE_TPM2); + ASSERT_DLOPEN(dlopen_libfido2, HAVE_LIBFIDO2); + ASSERT_DLOPEN(dlopen_bpf, HAVE_LIBBPF); + ASSERT_DLOPEN(dlopen_dw, HAVE_ELFUTILS); + ASSERT_DLOPEN(dlopen_elf, HAVE_ELFUTILS); + ASSERT_DLOPEN(dlopen_pcre2, HAVE_PCRE2); + ASSERT_DLOPEN(dlopen_p11kit, HAVE_P11KIT); + ASSERT_DLOPEN(dlopen_libarchive, HAVE_LIBARCHIVE); + ASSERT_DLOPEN(dlopen_lz4, HAVE_LZ4); + ASSERT_DLOPEN(dlopen_zstd, HAVE_ZSTD); + ASSERT_DLOPEN(dlopen_lzma, HAVE_XZ); + ASSERT_DLOPEN(dlopen_gcrypt, HAVE_GCRYPT); + ASSERT_DLOPEN(dlopen_libkmod, HAVE_KMOD); + ASSERT_DLOPEN(dlopen_libapparmor, HAVE_APPARMOR); return 0; } -- 2.47.3