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