chiark / gitweb /
load-fragment: unify config_parse_condition_{kernel, virt}
[elogind.git] / src / selinux-setup.c
index b2beb33d1f34d379aac37a8c37a699e77bbc46c9..e21ff6bb9fc9d14ca2416b5cda56172aa83b25ce 100644 (file)
@@ -45,8 +45,7 @@ int selinux_setup(char *const argv[]) {
        /* Before we load the policy we create a flag file to ensure
         * that after the reexec we iterate through /dev to relabel
         * things. */
-       mkdir_p("/dev/.systemd", 0755);
-       touch("/dev/.systemd/relabel-devtmpfs");
+       touch("/dev/.systemd-relabel-devtmpfs");
 
        if (selinux_init_load_policy(&enforce) == 0) {
                log_debug("Successfully loaded SELinux policy, reexecuting.");
@@ -59,9 +58,9 @@ int selinux_setup(char *const argv[]) {
                return -errno;
 
        } else {
-               log_full(enforce > 0 ? LOG_ERR : LOG_DEBUG, "Failed to load SELinux policy.");
+               log_full(enforce > 0 ? LOG_ERR : LOG_WARNING, "Failed to load SELinux policy.");
 
-               unlink("/dev/.systemd/relabel-devtmpfs");
+               unlink("/dev/.systemd-relabel-devtmpfs");
 
                if (enforce > 0)
                        return -EIO;