chiark / gitweb /
journal: react with immediate rotation to a couple of more errors
[elogind.git] / src / selinux-setup.c
index dc101b13bae1d5efc24c1a21c14606072502142c..a7e1fa4007f055793a3b66fab966ff3d7886420e 100644 (file)
@@ -73,6 +73,8 @@ int selinux_setup(bool *loaded_policy) {
                char timespan[FORMAT_TIMESPAN_MAX];
                char *label;
 
+               label_retest_selinux();
+
                /* Transition to the new context */
                r = label_get_create_label_from_exe(SYSTEMD_BINARY_PATH, &label);
                if (r < 0 || label == NULL) {
@@ -96,11 +98,13 @@ int selinux_setup(bool *loaded_policy) {
                *loaded_policy = true;
 
        } else {
+               log_open();
+
                if (enforce > 0) {
-                       log_error("Failed to load SELinux policy.");
+                       log_error("Failed to load SELinux policy. Freezing.");
                        return -EIO;
                } else
-                       log_debug("Unable to load SELinux policy.");
+                       log_debug("Unable to load SELinux policy. Ignoring.");
        }
 #endif