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:
Luca Boccassi
2026-06-01 18:46:24 +01:00
parent 590e226437
commit b0ede9f9ee
63 changed files with 127 additions and 127 deletions
+2 -2
View File
@@ -605,7 +605,7 @@ static int assess_system_call_filter(
uint64_t b;
int r;
r = dlopen_libseccomp(LOG_DEBUG);
r = DLOPEN_LIBSECCOMP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0) {
*ret_badness = UINT64_MAX;
*ret_description = NULL;
@@ -2578,7 +2578,7 @@ static int get_security_info(Unit *u, ExecContext *c, CGroupContext *g, Security
info->_umask = c->umask;
#if HAVE_SECCOMP
if (dlopen_libseccomp(LOG_DEBUG) >= 0) {
if (DLOPEN_LIBSECCOMP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED) >= 0) {
SET_FOREACH(key, c->syscall_archs) {
const char *name;
+1 -1
View File
@@ -1082,7 +1082,7 @@ static int install_secure_boot_auto_enroll(InstallContext *c) {
if (!c->secure_boot_certificate || !c->secure_boot_private_key)
return 0;
r = dlopen_libcrypto(LOG_DEBUG);
r = DLOPEN_LIBCRYPTO(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
+1 -1
View File
@@ -31,7 +31,7 @@ int bpf_bind_network_interface_supported(void) {
if (supported >= 0)
return supported;
if (dlopen_bpf(LOG_WARNING) < 0)
if (DLOPEN_BPF(LOG_WARNING, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED) < 0)
return (supported = false);
obj = bind_iface_bpf__open();
+1 -1
View File
@@ -78,7 +78,7 @@ bool bpf_restrict_fs_supported(bool initialize) {
if (!initialize)
return false;
if (dlopen_bpf(LOG_WARNING) < 0)
if (DLOPEN_BPF(LOG_WARNING, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED) < 0)
return (supported = false);
r = lsm_supported("bpf");
+2 -2
View File
@@ -168,7 +168,7 @@ bool bpf_restrict_fsaccess_supported(void) {
if (supported >= 0)
return supported;
if (dlopen_bpf(LOG_WARNING) < 0)
if (DLOPEN_BPF(LOG_WARNING, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED) < 0)
return (supported = false);
r = lsm_supported("bpf");
@@ -338,7 +338,7 @@ static int restrict_fsaccess_validate_deserialized_fds(Manager *m) {
assert(m);
r = dlopen_bpf(LOG_WARNING);
r = DLOPEN_BPF(LOG_WARNING, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return log_error_errno(SYNTHETIC_ERRNO(ENOTRECOVERABLE),
"bpf-restrict-fsaccess: Failed to load libbpf for FD validation, aborting.");
+1 -1
View File
@@ -86,7 +86,7 @@ int bpf_restrict_ifaces_supported(void) {
if (supported >= 0)
return supported;
if (dlopen_bpf(LOG_WARNING) < 0)
if (DLOPEN_BPF(LOG_WARNING, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED) < 0)
return (supported = false);
r = prepare_restrict_ifaces_bpf(NULL, true, NULL, &obj);
+1 -1
View File
@@ -125,7 +125,7 @@ int bpf_socket_bind_supported(void) {
_cleanup_(socket_bind_bpf_freep) struct socket_bind_bpf *obj = NULL;
int r;
if (dlopen_bpf(LOG_WARNING) < 0)
if (DLOPEN_BPF(LOG_WARNING, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED) < 0)
return false;
r = prepare_socket_bind_bpf(/* unit= */ NULL, /* allow_rules= */ NULL, /* deny_rules= */ NULL, &obj);
+7 -7
View File
@@ -1313,7 +1313,7 @@ static int setup_pam(
* parent process will exec() the actual daemon. We do things this way to ensure that the main PID of
* the daemon is the one we initially fork()ed. */
r = dlopen_libpam(LOG_ERR);
r = DLOPEN_LIBPAM(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
@@ -1579,7 +1579,7 @@ static bool seccomp_allows_drop_privileges(const ExecContext *c) {
assert(c);
/* No libseccomp, all is fine */
if (dlopen_libseccomp(LOG_DEBUG) < 0)
if (DLOPEN_LIBSECCOMP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED) < 0)
return true;
/* No syscall filter, we are allowed to drop privileges */
@@ -1889,7 +1889,7 @@ static int apply_restrict_filesystems(const ExecContext *c, const ExecParameters
}
/* We are in a new binary, so dl-open again */
r = dlopen_bpf(LOG_DEBUG);
r = DLOPEN_BPF(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
@@ -5998,10 +5998,10 @@ int exec_invoke(
}
/* Load a bunch of libraries we'll possibly need later, before we turn off dlopen() */
(void) dlopen_bpf(LOG_DEBUG);
(void) dlopen_cryptsetup(LOG_DEBUG);
(void) dlopen_libmount(LOG_DEBUG);
(void) dlopen_libseccomp(LOG_DEBUG);
(void) DLOPEN_BPF(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
(void) DLOPEN_CRYPTSETUP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
(void) DLOPEN_LIBMOUNT(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
(void) DLOPEN_LIBSECCOMP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
/* Let's now disable further dlopen()ing of libraries, since we are about to do namespace
* shenanigans, and do not want to mix resources from host and namespace */
+3 -3
View File
@@ -1576,7 +1576,7 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) {
fputc('~', f);
#if HAVE_SECCOMP
if (dlopen_libseccomp(LOG_DEBUG) >= 0) {
if (DLOPEN_LIBSECCOMP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED) >= 0) {
void *id, *val;
bool first = true;
HASHMAP_FOREACH_KEY(val, id, c->syscall_filter) {
@@ -1995,7 +1995,7 @@ char** exec_context_get_syscall_filter(const ExecContext *c) {
assert(c);
#if HAVE_SECCOMP
if (dlopen_libseccomp(LOG_DEBUG) < 0)
if (DLOPEN_LIBSECCOMP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED) < 0)
return strv_new(NULL);
void *id, *val;
@@ -2064,7 +2064,7 @@ char** exec_context_get_syscall_log(const ExecContext *c) {
assert(c);
#if HAVE_SECCOMP
if (dlopen_libseccomp(LOG_DEBUG) < 0)
if (DLOPEN_LIBSECCOMP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED) < 0)
return strv_new(NULL);
void *id, *val;
+1 -1
View File
@@ -3690,7 +3690,7 @@ int main(int argc, char *argv[]) {
}
/* Building without libmount is allowed, but if it is compiled in, then we must be able to load it */
r = dlopen_libmount(LOG_DEBUG);
r = DLOPEN_LIBMOUNT(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0 && !ERRNO_IS_NEG_NOT_SUPPORTED(r)) {
error_message = "Failed to load libmount.so";
goto finish;
+1 -1
View File
@@ -2408,7 +2408,7 @@ static int mount_test_startable(Unit *u) {
}
static bool mount_supported(void) {
return dlopen_libmount(LOG_DEBUG) >= 0;
return DLOPEN_LIBMOUNT(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED) >= 0;
}
static int mount_subsystem_ratelimited(Manager *m) {
+1 -1
View File
@@ -3984,7 +3984,7 @@ int refresh_extensions_in_namespace(
if (r > 0)
return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "Target namespace is not separate, cannot reload extensions");
(void) dlopen_cryptsetup(LOG_DEBUG);
(void) DLOPEN_CRYPTSETUP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
extension_dir = path_join(p->private_namespace_dir, "unit-extensions");
if (!extension_dir)
+1 -1
View File
@@ -17,7 +17,7 @@ int mac_selinux_setup(bool *loaded_policy) {
assert(loaded_policy);
r = dlopen_libselinux(LOG_DEBUG);
r = DLOPEN_LIBSELINUX(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return 0;
+1 -1
View File
@@ -188,7 +188,7 @@ static int is_tmpfs_with_noswap(dev_t devno) {
_cleanup_(mnt_free_tablep) struct libmnt_table *table = NULL;
int r;
r = dlopen_libmount(LOG_DEBUG);
r = DLOPEN_LIBMOUNT(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
+1 -1
View File
@@ -780,7 +780,7 @@ static int run(int argc, char *argv[]) {
if (r <= 0)
return r;
r = dlopen_cryptsetup(LOG_ERR);
r = DLOPEN_CRYPTSETUP(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
@@ -38,7 +38,7 @@ _public_ int cryptsetup_token_open_pin(
assert(pin || pin_size == 0);
assert(token >= 0);
r = dlopen_cryptsetup(LOG_DEBUG);
r = DLOPEN_CRYPTSETUP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
@@ -103,7 +103,7 @@ _public_ void cryptsetup_token_dump(
assert(json);
if (dlopen_cryptsetup(LOG_DEBUG) < 0)
if (DLOPEN_CRYPTSETUP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED) < 0)
return;
r = parse_luks2_fido2_data(cd, json, &rp_id, &salt, &salt_size, &cid, &cid_size, &required);
@@ -170,7 +170,7 @@ _public_ int cryptsetup_token_validate(
assert(json);
r = dlopen_cryptsetup(LOG_DEBUG);
r = DLOPEN_CRYPTSETUP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
@@ -37,7 +37,7 @@ _public_ int cryptsetup_token_open_pin(
assert(pin || pin_size == 0);
assert(token >= 0);
r = dlopen_cryptsetup(LOG_DEBUG);
r = DLOPEN_CRYPTSETUP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
@@ -95,7 +95,7 @@ _public_ void cryptsetup_token_dump(
_cleanup_free_ void *pkcs11_key = NULL;
Pkcs11RsaPadding rsa_padding = PKCS11_RSA_PADDING_PKCS1V15;
if (dlopen_cryptsetup(LOG_DEBUG) < 0)
if (DLOPEN_CRYPTSETUP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED) < 0)
return;
r = parse_luks2_pkcs11_data(cd, json, &pkcs11_uri, &pkcs11_key, &pkcs11_key_size, &rsa_padding);
@@ -125,7 +125,7 @@ _public_ int cryptsetup_token_validate(
sd_json_variant *w;
_cleanup_(sd_json_variant_unrefp) sd_json_variant *v = NULL;
r = dlopen_cryptsetup(LOG_DEBUG);
r = DLOPEN_CRYPTSETUP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
@@ -61,7 +61,7 @@ _public_ int cryptsetup_token_open_pin(
assert(ret_password);
assert(ret_password_len);
r = dlopen_cryptsetup(LOG_DEBUG);
r = DLOPEN_CRYPTSETUP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
@@ -191,7 +191,7 @@ _public_ void cryptsetup_token_dump(
assert(json);
if (dlopen_cryptsetup(LOG_DEBUG) < 0)
if (DLOPEN_CRYPTSETUP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED) < 0)
return;
r = sd_json_parse(json, SD_JSON_PARSE_MUST_BE_OBJECT, &v, /* reterr_line= */ NULL, /* reterr_column= */ NULL);
@@ -283,7 +283,7 @@ _public_ int cryptsetup_token_validate(
assert(json);
r = dlopen_cryptsetup(LOG_DEBUG);
r = DLOPEN_CRYPTSETUP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
+2 -2
View File
@@ -538,7 +538,7 @@ static int parse_one_option(const char *option) {
#if HAVE_OPENSSL
_cleanup_strv_free_ char **l = NULL;
r = dlopen_libcrypto(LOG_ERR);
r = DLOPEN_LIBCRYPTO(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
@@ -2881,7 +2881,7 @@ static int run(int argc, char *argv[]) {
if (r <= 0)
return r;
r = dlopen_cryptsetup(LOG_ERR);
r = DLOPEN_CRYPTSETUP(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
+1 -1
View File
@@ -493,7 +493,7 @@ static int parse_argv(int argc, char *argv[]) {
break;
OPTION_LONG("make-archive", NULL, "Convert the DDI to an archive file"):
r = dlopen_libarchive(LOG_ERR);
r = DLOPEN_LIBARCHIVE(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
+1 -1
View File
@@ -33,7 +33,7 @@ static int resize_crypt_luks_device(dev_t devno, const char *fstype, dev_t main_
uint64_t size;
int r;
r = dlopen_cryptsetup(LOG_ERR);
r = DLOPEN_CRYPTSETUP(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
+1 -1
View File
@@ -2482,7 +2482,7 @@ static int verb_list_signing_keys(int argc, char *argv[], uintptr_t _data, void
/* Let's decode the PEM key to DER (so that we lose prefix/suffix), then truncate it
* for display reasons. */
r = dlopen_libcrypto(LOG_DEBUG);
r = DLOPEN_LIBCRYPTO(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
+1 -1
View File
@@ -1537,7 +1537,7 @@ int manager_startup(Manager *m) {
assert(m);
r = dlopen_libcrypto(LOG_ERR);
r = DLOPEN_LIBCRYPTO(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
+4 -4
View File
@@ -232,7 +232,7 @@ static int fscrypt_slot_try_v1(
assert(encrypted_size > 0);
assert(match_key_descriptor);
r = dlopen_libcrypto(LOG_ERR);
r = DLOPEN_LIBCRYPTO(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
@@ -331,7 +331,7 @@ static int fscrypt_slot_try_v2(
assert(iovec_is_set(tag));
assert(match_key_descriptor);
r = dlopen_libcrypto(LOG_ERR);
r = DLOPEN_LIBCRYPTO(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
@@ -700,7 +700,7 @@ static int fscrypt_slot_set(
size_t encrypted_size;
ssize_t ss;
r = dlopen_libcrypto(LOG_ERR);
r = DLOPEN_LIBCRYPTO(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
@@ -813,7 +813,7 @@ int home_create_fscrypt(
assert(setup);
assert(ret_home);
r = dlopen_libcrypto(LOG_ERR);
r = DLOPEN_LIBCRYPTO(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
+11 -11
View File
@@ -146,7 +146,7 @@ static int probe_file_system_by_fd(
assert(ret_fstype);
assert(ret_uuid);
r = dlopen_libblkid(LOG_DEBUG);
r = DLOPEN_LIBBLKID(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
@@ -529,7 +529,7 @@ static int acquire_open_luks_device(
assert(setup);
assert(!setup->crypt_device);
r = dlopen_cryptsetup(LOG_DEBUG);
r = DLOPEN_CRYPTSETUP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
@@ -684,7 +684,7 @@ static int luks_validate(
assert(ret_size);
assert(sector_size > 0);
r = dlopen_libblkid(LOG_DEBUG);
r = DLOPEN_LIBBLKID(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
@@ -805,7 +805,7 @@ static int crypt_device_to_evp_cipher(struct crypt_device *cd, const EVP_CIPHER
assert(cd);
assert(ret);
r = dlopen_libcrypto(LOG_ERR);
r = DLOPEN_LIBCRYPTO(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
@@ -1293,7 +1293,7 @@ int home_setup_luks(
assert(setup);
assert(user_record_storage(h) == USER_LUKS);
r = dlopen_cryptsetup(LOG_DEBUG);
r = DLOPEN_CRYPTSETUP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
@@ -1594,7 +1594,7 @@ int home_activate_luks(
assert(setup);
assert(ret_home);
r = dlopen_cryptsetup(LOG_DEBUG);
r = DLOPEN_CRYPTSETUP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
@@ -2211,11 +2211,11 @@ int home_create_luks(
assert(setup->image_fd < 0);
assert(ret_home);
r = dlopen_fdisk(LOG_DEBUG);
r = DLOPEN_FDISK(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
r = dlopen_cryptsetup(LOG_DEBUG);
r = DLOPEN_CRYPTSETUP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
@@ -3250,11 +3250,11 @@ int home_resize_luks(
assert(user_record_storage(h) == USER_LUKS);
assert(setup);
r = dlopen_fdisk(LOG_DEBUG);
r = DLOPEN_FDISK(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
r = dlopen_cryptsetup(LOG_DEBUG);
r = DLOPEN_CRYPTSETUP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
@@ -3712,7 +3712,7 @@ int home_passwd_luks(
assert(user_record_storage(h) == USER_LUKS);
assert(setup);
r = dlopen_cryptsetup(LOG_DEBUG);
r = DLOPEN_CRYPTSETUP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
+1 -1
View File
@@ -1328,7 +1328,7 @@ static int determine_default_storage(UserStorage *ret) {
if (r < 0)
log_warning_errno(r, "Failed to determine if %s is encrypted, ignoring: %m", get_home_root());
r = dlopen_cryptsetup(LOG_DEBUG);
r = DLOPEN_CRYPTSETUP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
log_info("Not using '%s' storage, since libcryptsetup could not be loaded.", user_storage_to_string(USER_LUKS));
else {
+10 -10
View File
@@ -786,11 +786,11 @@ _public_ PAM_EXTERN int pam_sm_authenticate(
bool debug = false;
int r;
r = dlopen_libpam(LOG_DEBUG);
r = DLOPEN_LIBPAM(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return PAM_SERVICE_ERR;
(void) dlopen_libintl(LOG_DEBUG); /* best-effort: messages won't be translated if this fails */
(void) DLOPEN_LIBINTL(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED); /* best-effort: messages won't be translated if this fails */
pam_log_setup();
@@ -853,11 +853,11 @@ _public_ PAM_EXTERN int pam_sm_open_session(
bool debug = false;
int r;
r = dlopen_libpam(LOG_DEBUG);
r = DLOPEN_LIBPAM(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return PAM_SERVICE_ERR;
(void) dlopen_libintl(LOG_DEBUG); /* best-effort: messages won't be translated if this fails */
(void) DLOPEN_LIBINTL(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED); /* best-effort: messages won't be translated if this fails */
pam_log_setup();
@@ -912,11 +912,11 @@ _public_ PAM_EXTERN int pam_sm_close_session(
bool debug = false;
int r;
r = dlopen_libpam(LOG_DEBUG);
r = DLOPEN_LIBPAM(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return PAM_SERVICE_ERR;
(void) dlopen_libintl(LOG_DEBUG); /* best-effort: messages won't be translated if this fails */
(void) DLOPEN_LIBINTL(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED); /* best-effort: messages won't be translated if this fails */
pam_log_setup();
@@ -979,11 +979,11 @@ _public_ PAM_EXTERN int pam_sm_acct_mgmt(
usec_t t;
int r;
r = dlopen_libpam(LOG_DEBUG);
r = DLOPEN_LIBPAM(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return PAM_SERVICE_ERR;
(void) dlopen_libintl(LOG_DEBUG); /* best-effort: messages won't be translated if this fails */
(void) DLOPEN_LIBINTL(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED); /* best-effort: messages won't be translated if this fails */
pam_log_setup();
@@ -1100,11 +1100,11 @@ _public_ PAM_EXTERN int pam_sm_chauthtok(
bool debug = false;
int r;
r = dlopen_libpam(LOG_DEBUG);
r = DLOPEN_LIBPAM(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return PAM_SERVICE_ERR;
(void) dlopen_libintl(LOG_DEBUG); /* best-effort: messages won't be translated if this fails */
(void) DLOPEN_LIBINTL(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED); /* best-effort: messages won't be translated if this fails */
pam_log_setup();
+1 -1
View File
@@ -3065,7 +3065,7 @@ static int run(int argc, char* argv[]) {
if (r <= 0)
return r;
r = dlopen_curl(LOG_DEBUG);
r = DLOPEN_CURL(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
+2 -2
View File
@@ -32,7 +32,7 @@ int import_fork_tar_x(int tree_fd, int userns_fd, PidRef *ret_pid) {
assert(tree_fd >= 0);
assert(ret_pid);
r = dlopen_libarchive(LOG_DEBUG);
r = DLOPEN_LIBARCHIVE(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
@@ -99,7 +99,7 @@ int import_fork_tar_c(int tree_fd, int userns_fd, PidRef *ret_pid) {
assert(tree_fd >= 0);
assert(ret_pid);
r = dlopen_libarchive(LOG_DEBUG);
r = DLOPEN_LIBARCHIVE(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
+1 -1
View File
@@ -282,7 +282,7 @@ static int pull_job_open_disk(PullJob *j) {
}
if (j->calc_checksum) {
r = dlopen_libcrypto(LOG_ERR);
r = DLOPEN_LIBCRYPTO(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
+1 -1
View File
@@ -204,7 +204,7 @@ static int run(int argc, char *argv[]) {
log_setup();
r = dlopen_cryptsetup(LOG_ERR);
r = DLOPEN_CRYPTSETUP(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
+1 -1
View File
@@ -1258,7 +1258,7 @@ static int run(int argc, char *argv[]) {
if (r <= 0)
return r;
r = dlopen_microhttpd(LOG_ERR);
r = DLOPEN_MICROHTTPD(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
+1 -1
View File
@@ -466,7 +466,7 @@ static int setup_microhttpd_server(RemoteServer *s,
#if HAVE_MICROHTTPD
int r;
r = dlopen_microhttpd(LOG_ERR);
r = DLOPEN_MICROHTTPD(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
+1 -1
View File
@@ -879,7 +879,7 @@ static int run(int argc, char **argv) {
if (r <= 0)
return r;
r = dlopen_curl(LOG_DEBUG);
r = DLOPEN_CURL(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
+1 -1
View File
@@ -233,7 +233,7 @@ static int verb_extract_public(int argc, char *argv[], uintptr_t _data, void *us
return r;
}
r = dlopen_libcrypto(LOG_ERR);
r = DLOPEN_LIBCRYPTO(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
+2 -2
View File
@@ -1748,7 +1748,7 @@ _public_ PAM_EXTERN int pam_sm_open_session(
assert(pamh);
r = dlopen_libpam(LOG_DEBUG);
r = DLOPEN_LIBPAM(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return PAM_SERVICE_ERR;
@@ -1847,7 +1847,7 @@ _public_ PAM_EXTERN int pam_sm_close_session(
assert(pamh);
r = dlopen_libpam(LOG_DEBUG);
r = DLOPEN_LIBPAM(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return PAM_SERVICE_ERR;
+1 -1
View File
@@ -19,7 +19,7 @@ _public_ PAM_EXTERN int pam_sm_authenticate(
assert(pamh);
r = dlopen_libpam(LOG_DEBUG);
r = DLOPEN_LIBPAM(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return PAM_SERVICE_ERR;
+2 -2
View File
@@ -176,7 +176,7 @@ static int parse_argv(int argc, char *argv[], char ***ret_args) {
"Select TPM bank (SHA1, SHA256, SHA384, SHA512)"): {
const EVP_MD *implementation;
r = dlopen_libcrypto(LOG_ERR);
r = DLOPEN_LIBCRYPTO(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
@@ -1122,7 +1122,7 @@ static int run(int argc, char *argv[]) {
if (r <= 0)
return r;
r = dlopen_libcrypto(LOG_ERR);
r = DLOPEN_LIBCRYPTO(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
+1 -1
View File
@@ -108,7 +108,7 @@ int manager_install_sysctl_monitor(Manager *manager) {
assert(manager);
r = dlopen_bpf(LOG_DEBUG);
r = DLOPEN_BPF(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (ERRNO_IS_NEG_NOT_SUPPORTED(r))
return log_debug_errno(r, "sysctl monitor disabled, as BPF support is not available.");
if (r < 0)
+1 -1
View File
@@ -1826,7 +1826,7 @@ static int oci_seccomp(const char *name, sd_json_variant *v, sd_json_dispatch_fl
if (r < 0)
return json_log(def, flags, r, "Unknown default action: %s", sd_json_variant_string(def));
r = dlopen_libseccomp(LOG_DEBUG);
r = DLOPEN_LIBSECCOMP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return json_log(def, flags, r, "No support for libseccomp: %m");
+3 -3
View File
@@ -6146,9 +6146,9 @@ static int run(int argc, char *argv[]) {
if (arg_cleanup)
return do_cleanup();
(void) dlopen_libmount(LOG_DEBUG);
(void) dlopen_libseccomp(LOG_DEBUG);
(void) dlopen_libselinux(LOG_DEBUG);
(void) DLOPEN_LIBMOUNT(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
(void) DLOPEN_LIBSECCOMP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
(void) DLOPEN_LIBSELINUX(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
r = cg_has_legacy();
if (r < 0)
+1 -1
View File
@@ -68,7 +68,7 @@ int userns_restrict_install(
if (r == 0)
return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "bpf-lsm not supported, can't lock down user namespace.");
r = dlopen_bpf(LOG_DEBUG);
r = DLOPEN_BPF(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
+1 -1
View File
@@ -90,7 +90,7 @@ static int parse_argv(int argc, char *argv[], char ***ret_args) {
OPTION_LONG("bank", "DIGEST", "Select TPM PCR bank (SHA1, SHA256)"): {
const EVP_MD *implementation;
r = dlopen_libcrypto(LOG_ERR);
r = DLOPEN_LIBCRYPTO(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
+1 -1
View File
@@ -5481,7 +5481,7 @@ static int run(int argc, char *argv[]) {
if (r <= 0)
return r;
r = dlopen_libcrypto(LOG_ERR);
r = DLOPEN_LIBCRYPTO(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
+2 -2
View File
@@ -610,8 +610,8 @@ static int portable_extract_by_path(
* there, and extract the metadata we need. The metadata is sent from the child back to us. */
/* Load some libraries before we fork workers off that want to use them */
(void) dlopen_cryptsetup(LOG_DEBUG);
(void) dlopen_libmount(LOG_DEBUG);
(void) DLOPEN_CRYPTSETUP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
(void) DLOPEN_LIBMOUNT(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
r = mkdtemp_malloc("/tmp/inspect-XXXXXX", &tmpdir);
if (r < 0)
+8 -8
View File
@@ -3101,7 +3101,7 @@ static int partition_read_definition(
"Cannot format %s filesystem without source files, refusing.", p->format);
if (p->verity != VERITY_OFF || p->encrypt != ENCRYPT_OFF) {
r = dlopen_cryptsetup(LOG_DEBUG);
r = DLOPEN_CRYPTSETUP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return log_syntax(NULL, LOG_ERR, path, 1, r,
"libcryptsetup not found, Verity=/Encrypt= are not supported: %m");
@@ -4708,7 +4708,7 @@ static int context_wipe_range(Context *context, uint64_t offset, uint64_t size)
assert(offset != UINT64_MAX);
assert(size != UINT64_MAX);
r = dlopen_libblkid(LOG_ERR);
r = DLOPEN_LIBBLKID(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
@@ -5400,7 +5400,7 @@ static int partition_encrypt(Context *context, Partition *p, PartitionTarget *ta
assert(p);
assert(p->encrypt != ENCRYPT_OFF);
r = dlopen_cryptsetup(LOG_ERR);
r = DLOPEN_CRYPTSETUP(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
@@ -5939,7 +5939,7 @@ static int partition_format_verity_hash(
(void) partition_hint(p, node, &hint);
r = dlopen_cryptsetup(LOG_ERR);
r = DLOPEN_CRYPTSETUP(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
@@ -6041,7 +6041,7 @@ static int sign_verity_roothash(
assert(iovec_is_set(roothash));
assert(ret_signature);
r = dlopen_libcrypto(LOG_ERR);
r = DLOPEN_LIBCRYPTO(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
@@ -7128,7 +7128,7 @@ static int partition_populate_filesystem(Context *context, Partition *p, const c
* appear in the host namespace. Hence we fork a child that has its own file system namespace and
* detached mount propagation. */
(void) dlopen_libmount(LOG_DEBUG);
(void) DLOPEN_LIBMOUNT(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
r = pidref_safe_fork(
"(sd-copy)",
@@ -8720,7 +8720,7 @@ static int resolve_copy_blocks_auto_candidate(
return log_error_errno(r, "Failed to open block device " DEVNUM_FORMAT_STR ": %m",
DEVNUM_FORMAT_VAL(whole_devno));
r = dlopen_libblkid(LOG_ERR);
r = DLOPEN_LIBBLKID(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
@@ -11543,7 +11543,7 @@ static int run(int argc, char *argv[]) {
if (r <= 0)
return r;
r = dlopen_fdisk(LOG_ERR);
r = DLOPEN_FDISK(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
+1 -1
View File
@@ -81,7 +81,7 @@ static int http_upload_collected(Context *context, sd_json_variant *report) {
_cleanup_free_ char *json = NULL;
int r;
r = dlopen_curl(LOG_DEBUG);
r = DLOPEN_CURL(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
+3 -3
View File
@@ -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;
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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),
+1 -1
View File
@@ -425,7 +425,7 @@ static int verb_sign(int argc, char *argv[], uintptr_t _data, void *userdata) {
_cleanup_(iovec_done) struct iovec signed_attributes_signature = {};
int r;
r = dlopen_libcrypto(LOG_ERR);
r = DLOPEN_LIBCRYPTO(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
+1 -1
View File
@@ -36,7 +36,7 @@ int swap_list_get(const char *swaps, SwapDevice **head) {
assert(head);
r = dlopen_libmount(LOG_ERR);
r = DLOPEN_LIBMOUNT(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
+4 -4
View File
@@ -1676,7 +1676,7 @@ static int unmerge(
bool need_to_reload;
int r;
(void) dlopen_libmount(LOG_DEBUG);
(void) DLOPEN_LIBMOUNT(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
r = need_reload(image_class, hierarchies, no_reload);
if (r < 0)
@@ -2257,9 +2257,9 @@ static int merge(ImageClass image_class,
int r;
(void) dlopen_cryptsetup(LOG_DEBUG);
(void) dlopen_libblkid(LOG_DEBUG);
(void) dlopen_libmount(LOG_DEBUG);
(void) DLOPEN_CRYPTSETUP(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
(void) DLOPEN_LIBBLKID(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
(void) DLOPEN_LIBMOUNT(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
_cleanup_(pidref_done) PidRef pidref = PIDREF_NULL;
r = pidref_safe_fork("(sd-merge)", FORK_DEATHSIG_SIGTERM|FORK_LOG|FORK_NEW_MOUNTNS, &pidref);
+2 -2
View File
@@ -161,7 +161,7 @@ int find_suitable_partition(
POINTER_MAY_BE_NULL(partition_type);
assert(ret);
r = dlopen_fdisk(LOG_DEBUG);
r = DLOPEN_FDISK(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
@@ -230,7 +230,7 @@ int patch_partition(
if (change == 0) /* Nothing to do */
return 0;
r = dlopen_fdisk(LOG_DEBUG);
r = DLOPEN_FDISK(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
+1 -1
View File
@@ -234,7 +234,7 @@ static int resource_load_from_blockdev(Resource *rr) {
assert(rr);
r = dlopen_fdisk(LOG_DEBUG);
r = DLOPEN_FDISK(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
+1 -1
View File
@@ -107,7 +107,7 @@ static int do_attach(void) {
struct stat st;
int r;
r = dlopen_bpf(LOG_ERR);
r = DLOPEN_BPF(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return log_error_errno(r, "Failed to dlopen libbpf: %m");
+1 -1
View File
@@ -11,7 +11,7 @@ static int run(int argc, char *argv[]) {
#if HAVE_LIBBPF
int r;
r = dlopen_bpf(LOG_ERR);
r = DLOPEN_BPF(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
+2 -2
View File
@@ -1267,7 +1267,7 @@ static int parse_acl_cond_exec(
assert(cond_exec);
assert(ret);
r = dlopen_libacl(LOG_DEBUG);
r = DLOPEN_LIBACL(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
@@ -1386,7 +1386,7 @@ static int path_set_acl(
assert(c);
r = dlopen_libacl(LOG_DEBUG);
r = DLOPEN_LIBACL(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (r < 0)
return r;
+1 -1
View File
@@ -569,7 +569,7 @@ static int run(int argc, char *argv[]) {
return EXIT_SUCCESS;
}
r = dlopen_libcrypto(LOG_ERR);
r = DLOPEN_LIBCRYPTO(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
+1 -1
View File
@@ -506,7 +506,7 @@ static int builtin_blkid(UdevEvent *event, int argc, char *argv[]) {
int64_t offset = 0;
int r;
r = dlopen_libblkid(LOG_DEBUG);
r = DLOPEN_LIBBLKID(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return log_device_debug_errno(dev, r, "blkid not available: %m");
+5 -5
View File
@@ -58,11 +58,11 @@ int run_udevd(int argc, char *argv[]) {
return log_error_errno(r, "Failed to create /run/udev: %m");
/* Load some shared libraries before we fork any workers */
(void) dlopen_libacl(LOG_DEBUG);
(void) dlopen_libblkid(LOG_DEBUG);
(void) dlopen_libkmod(LOG_DEBUG);
(void) dlopen_libmount(LOG_DEBUG);
(void) dlopen_tpm2(LOG_DEBUG);
(void) DLOPEN_LIBACL(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
(void) DLOPEN_LIBBLKID(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
(void) DLOPEN_LIBKMOD(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
(void) DLOPEN_LIBMOUNT(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
(void) DLOPEN_TPM2(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
if (arg_daemonize) {
pid_t pid;
+1 -1
View File
@@ -290,7 +290,7 @@ static int validate_gpt_metadata_one(sd_device *d, const char *path, const Valid
assert(d);
assert(f);
r = dlopen_libblkid(LOG_ERR);
r = DLOPEN_LIBBLKID(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;
+1 -1
View File
@@ -491,7 +491,7 @@ static int run(int argc, char *argv[]) {
log_setup();
r = dlopen_cryptsetup(LOG_ERR);
r = DLOPEN_CRYPTSETUP(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED);
if (r < 0)
return r;