]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
selinux: update log message to suppress warning by coverity
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 6 Feb 2020 10:47:28 +0000 (19:47 +0900)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 6 Feb 2020 15:04:50 +0000 (16:04 +0100)
Fixes CID#1417440 and CID#1417438.

src/core/selinux-access.c

index 4500e4452fa22f063afc520100a655386dd9e490..fb382317027a0116ff3b7ca35353f485f9382f2c 100644 (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;
                 }