1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 06:25:37 +03:00

selinux: update log message to suppress warning by coverity

Fixes CID#1417440 and CID#1417438.
This commit is contained in:
Yu Watanabe 2020-02-06 19:47:28 +09:00 committed by Frantisek Sumsal
parent 9207625d9b
commit 2b6a90d17f

View File

@ -223,7 +223,7 @@ int mac_selinux_generic_access_check(
r = getfilecon_raw(path, &fcon);
if (r < 0) {
log_warning_errno(errno, "SELinux getfilecon_raw on '%s' failed: %m (tclass=%s perm=%s)", path, tclass, permission);
log_warning_errno(errno, "SELinux getfilecon_raw on '%s' failed (tclass=%s perm=%s): %m", path, tclass, permission);
r = sd_bus_error_setf(error, SD_BUS_ERROR_ACCESS_DENIED, "Failed to get file context on %s.", path);
goto finish;
}
@ -232,7 +232,7 @@ int mac_selinux_generic_access_check(
} else {
r = getcon_raw(&fcon);
if (r < 0) {
log_warning_errno(errno, "SELinux getcon_raw failed: %m (tclass=%s perm=%s)", tclass, permission);
log_warning_errno(errno, "SELinux getcon_raw failed (tclass=%s perm=%s): %m", tclass, permission);
r = sd_bus_error_setf(error, SD_BUS_ERROR_ACCESS_DENIED, "Failed to get current context.");
goto finish;
}