]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: use shared dl-utils for SELinux dlopen
authorKarel Zak <kzak@redhat.com>
Mon, 13 Jul 2026 14:18:29 +0000 (16:18 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 14 Jul 2026 12:39:33 +0000 (14:39 +0200)
commitb93cc39a8ed6d9ee537a28b3f011df27ed7d6feb
tree75554041cc5a829e0dd0a8e82b9b1414bba74671
parent74cef51bcb0bb9769fbe6a993fd59cda04b792e5
libmount: use shared dl-utils for SELinux dlopen

Add lib/dl-selinux.c and include/dl-selinux.h as a SELinux dlopen
wrapper using the shared dl-utils infrastructure. This replaces the
direct libselinux linking with runtime dlopen(), allowing libmount to
gracefully handle the case when libselinux is not installed.

The hook_selinux.c and lib/selinux-utils.c now use selinux_call()
macro to call SELinux functions through the dlopen'd function pointer
table.

Signed-off-by: Karel Zak <kzak@redhat.com>
include/Makemodule.am
include/dl-selinux.h [new file with mode: 0644]
lib/dl-selinux.c [new file with mode: 0644]
lib/meson.build
lib/selinux-utils.c
libmount/meson.build
libmount/src/Makemodule.am
libmount/src/hook_selinux.c