From 2669c66614cf10fe006863a0ad10484a26d3a51b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 15 Apr 2021 11:18:32 +0200 Subject: [PATCH] core/selinux: fix wrong assertion when 0 is passed to log_debug https://github.com/systemd/systemd/pull/19317#issuecomment-820245680 --- src/core/selinux-access.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/selinux-access.c b/src/core/selinux-access.c index 5605c710536..cdb82dd8947 100644 --- a/src/core/selinux-access.c +++ b/src/core/selinux-access.c @@ -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; } -- 2.47.3