From: Zbigniew Jędrzejewski-Szmek Date: Thu, 15 Apr 2021 09:18:32 +0000 (+0200) Subject: core/selinux: fix wrong assertion when 0 is passed to log_debug X-Git-Tag: v249-rc1~407^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2669c66614cf10fe006863a0ad10484a26d3a51b;p=thirdparty%2Fsystemd.git core/selinux: fix wrong assertion when 0 is passed to log_debug https://github.com/systemd/systemd/pull/19317#issuecomment-820245680 --- 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; }