From 375a4bd878e472ed9f14627c29bc0b484bf37be7 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Thu, 20 Nov 2025 20:07:32 +0100 Subject: [PATCH] core/selinux-setup: actually skip setup gracefully when libselinux is not available Follow-up for 83b6ef9b62765b11bc602eae906ff13a5464a638 --- src/core/selinux-setup.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/selinux-setup.c b/src/core/selinux-setup.c index 891fa3cd8ec..6f78346036d 100644 --- a/src/core/selinux-setup.c +++ b/src/core/selinux-setup.c @@ -19,8 +19,10 @@ int mac_selinux_setup(bool *loaded_policy) { int r; r = dlopen_libselinux(); - if (r < 0) - return log_debug_errno(r, "No SELinux library available, skipping setup: %m"); + if (r < 0) { + log_debug_errno(r, "No SELinux library available, skipping setup."); + return 0; + } mac_selinux_disable_logging(); -- 2.47.3