tree-wide: drop DLOPEN_FOO() macros
Since 4c0d8d9673, most dlopen notes are
set at the beginning of the executables. Let's manage all dlopen notes
there, rather than setting them where dlopen is called.
Note that the only exceptions are the LIBBPF_NOTE for networkd and
nsresource. Since dlopen_bpf() is wrapped in an `#if` guard, the notes
are instead set within the corresponding functionality.
As a result, the DLOPEN_FOO() wrapper macros are no longer needed and
can be dropped completely.
This commit is contained in:
@@ -3794,6 +3794,7 @@ static int run(int argc, char **argv) {
|
||||
int r;
|
||||
|
||||
LIBCRYPTO_NOTE(suggested);
|
||||
LIBIDN2_NOTE(recommended);
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
log_setup();
|
||||
|
||||
@@ -735,7 +735,7 @@ int dnssec_verify_rrset(
|
||||
assert(dnskey);
|
||||
assert(result);
|
||||
|
||||
r = DLOPEN_LIBCRYPTO(LOG_WARNING, recommended);
|
||||
r = dlopen_libcrypto(LOG_WARNING);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
@@ -1092,7 +1092,7 @@ int dnssec_verify_dnskey_by_ds(DnsResourceRecord *dnskey, DnsResourceRecord *ds,
|
||||
assert(dnskey);
|
||||
assert(ds);
|
||||
|
||||
r = DLOPEN_LIBCRYPTO(LOG_WARNING, recommended);
|
||||
r = dlopen_libcrypto(LOG_WARNING);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
@@ -1232,7 +1232,7 @@ int dnssec_nsec3_hash(DnsResourceRecord *nsec3, const char *name, void *ret) {
|
||||
assert(name);
|
||||
assert(ret);
|
||||
|
||||
r = DLOPEN_LIBCRYPTO(LOG_WARNING, recommended);
|
||||
r = dlopen_libcrypto(LOG_WARNING);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
||||
@@ -412,11 +412,11 @@ int dnstls_manager_init(Manager *manager) {
|
||||
if (manager->dnstls_data.ctx)
|
||||
return 0;
|
||||
|
||||
r = DLOPEN_LIBCRYPTO(LOG_WARNING, recommended);
|
||||
r = dlopen_libcrypto(LOG_WARNING);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = DLOPEN_LIBSSL(LOG_WARNING, recommended);
|
||||
r = dlopen_libssl(LOG_WARNING);
|
||||
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, recommended) >= 0) {
|
||||
if (dlopen_idn(LOG_DEBUG) >= 0) {
|
||||
r = sym_idn2_to_unicode_8z8z(label, &utf8, 0);
|
||||
if (r != IDN2_OK)
|
||||
return log_debug_errno(SYNTHETIC_ERRNO(EUCLEAN),
|
||||
|
||||
@@ -25,7 +25,10 @@ static int run(int argc, char *argv[]) {
|
||||
_unused_ _cleanup_(notify_on_cleanup) const char *notify_stop = NULL;
|
||||
int r;
|
||||
|
||||
LIBCRYPTO_NOTE(recommended);
|
||||
LIBIDN2_NOTE(recommended);
|
||||
LIBSELINUX_NOTE(recommended);
|
||||
LIBSSL_NOTE(recommended);
|
||||
|
||||
log_setup();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user