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:
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user