]> git.ipfire.org Git - thirdparty/util-linux.git/commit
tools: switch SELinux to runtime optional via dlopen
authorKarel Zak <kzak@redhat.com>
Mon, 13 Jul 2026 14:28:43 +0000 (16:28 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 14 Jul 2026 12:39:33 +0000 (14:39 +0200)
commitfeaacdbb9f22d23e09b5ee29892063afe5dcc713
tree8570fe2e3a4312ef016c68769f607839aaacab17
parentb93cc39a8ed6d9ee537a28b3f011df27ed7d6feb
tools: switch SELinux to runtime optional via dlopen

Replace direct libselinux linking with runtime dlopen() using the
shared dl-utils infrastructure. All tools that use SELinux functions
now call them through selinux_call() macro and gracefully handle the
case when libselinux is not installed at runtime.

Affected tools: mkswap, chfn, chsh, lslogins, sulogin, vipw, namei,
mount, nsenter, login.

Signed-off-by: Karel Zak <kzak@redhat.com>
16 files changed:
disk-utils/Makemodule.am
disk-utils/meson.build
disk-utils/mkswap.c
login-utils/Makemodule.am
login-utils/chfn.c
login-utils/chsh.c
login-utils/lslogins.c
login-utils/meson.build
login-utils/sulogin.c
login-utils/vipw.c
meson.build
misc-utils/Makemodule.am
misc-utils/namei.c
sys-utils/Makemodule.am
sys-utils/mount.c
sys-utils/nsenter.c