tree-wide: convert dlopen_*() callers to DLOPEN_* wrapper macros
Switch the executable-owned call sites from the plain dlopen_<lib>() helpers to the new DLOPEN_<LIB>() macros, so that each binary that loads an optional library at runtime now carries its own .note.dlopen note instead of relying solely on libsystemd-shared. Each call site passes a priority reflecting whether it hard-depends on the library (required) or degrades gracefully without it (recommended). Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -709,7 +709,7 @@ int dnssec_verify_rrset(
|
||||
assert(dnskey);
|
||||
assert(result);
|
||||
|
||||
r = dlopen_libcrypto(LOG_DEBUG);
|
||||
r = DLOPEN_LIBCRYPTO(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
@@ -1066,7 +1066,7 @@ int dnssec_verify_dnskey_by_ds(DnsResourceRecord *dnskey, DnsResourceRecord *ds,
|
||||
assert(dnskey);
|
||||
assert(ds);
|
||||
|
||||
r = dlopen_libcrypto(LOG_DEBUG);
|
||||
r = DLOPEN_LIBCRYPTO(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
@@ -1206,7 +1206,7 @@ int dnssec_nsec3_hash(DnsResourceRecord *nsec3, const char *name, void *ret) {
|
||||
assert(name);
|
||||
assert(ret);
|
||||
|
||||
r = dlopen_libcrypto(LOG_DEBUG);
|
||||
r = DLOPEN_LIBCRYPTO(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
||||
@@ -397,11 +397,11 @@ int dnstls_manager_init(Manager *manager) {
|
||||
|
||||
assert(manager);
|
||||
|
||||
r = dlopen_libcrypto(LOG_WARNING);
|
||||
r = DLOPEN_LIBCRYPTO(LOG_WARNING, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = dlopen_libssl(LOG_WARNING);
|
||||
r = DLOPEN_LIBSSL(LOG_WARNING, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ int resolve_system_hostname(char **full_hostname, char **first_label) {
|
||||
#if HAVE_LIBIDN2
|
||||
_cleanup_free_ char *utf8 = NULL;
|
||||
|
||||
if (dlopen_idn(LOG_DEBUG) >= 0) {
|
||||
if (DLOPEN_IDN(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED) >= 0) {
|
||||
r = sym_idn2_to_unicode_8z8z(label, &utf8, 0);
|
||||
if (r != IDN2_OK)
|
||||
return log_debug_errno(SYNTHETIC_ERRNO(EUCLEAN),
|
||||
|
||||
Reference in New Issue
Block a user