]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/selinux: fix wrong assertion when 0 is passed to log_debug
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 15 Apr 2021 09:18:32 +0000 (11:18 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 15 Apr 2021 09:18:37 +0000 (11:18 +0200)
https://github.com/systemd/systemd/pull/19317#issuecomment-820245680

src/core/selinux-access.c

index 5605c710536796abe170e91a753740406a91f8b9..cdb82dd8947ad33d46f2bcc52773aa0d7581d4ca 100644 (file)
@@ -273,8 +273,9 @@ int mac_selinux_generic_access_check(
                         sd_bus_error_set(error, SD_BUS_ERROR_ACCESS_DENIED, "SELinux policy denies access.");
         }
 
-        log_debug_errno(r, "SELinux access check scon=%s tcon=%s tclass=%s perm=%s state=%s path=%s cmdline=%s: %m",
-                        scon, fcon, tclass, permission, enforce ? "enforcing" : "permissive", path, cl);
+        log_full_errno_zerook(LOG_DEBUG, r,
+                              "SELinux access check scon=%s tcon=%s tclass=%s perm=%s state=%s path=%s cmdline=%s: %m",
+                              scon, fcon, tclass, permission, enforce ? "enforcing" : "permissive", path, cl);
         return enforce ? r : 0;
 }