chiark / gitweb /
Don't show a warning message in non-enforcing mode.
[elogind.git] / src / selinux-setup.c
index 620c49e686a56646ba25cc01b0d69bee9b842908..bc36e765e1a7eefb15b2aed1e7f8813782fcfca9 100644 (file)
@@ -72,12 +72,13 @@ int selinux_setup(char *const argv[]) {
                return -errno;
 
        } else {
-               log_full(enforce > 0 ? LOG_ERR : LOG_WARNING, "Failed to load SELinux policy.");
 
                unlink("/dev/.systemd-relabel-run-dev");
 
-               if (enforce > 0)
+               if (enforce > 0) {
+                       log_full(LOG_ERR, "Failed to load SELinux policy.");
                        return -EIO;
+               }
        }
 #endif