]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/selinux-setup: actually skip setup gracefully when libselinux is not available 39859/head
authorMike Yuan <me@yhndnzj.com>
Thu, 20 Nov 2025 19:07:32 +0000 (20:07 +0100)
committerMike Yuan <me@yhndnzj.com>
Sat, 22 Nov 2025 18:07:28 +0000 (19:07 +0100)
Follow-up for 83b6ef9b62765b11bc602eae906ff13a5464a638

src/core/selinux-setup.c

index 891fa3cd8ec26323143b26d08f3783ef934bf3f4..6f78346036d7cb7399c7f935fe5c193cde48ca9b 100644 (file)
@@ -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();