core/selinux: fix wrong assertion when 0 is passed to log_debug

https://github.com/systemd/systemd/pull/19317#issuecomment-820245680
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-04-15 11:18:37 +02:00
parent 3d346b8106
commit 2669c66614
+3 -2
View 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;
}