chiark / gitweb /
udevtest: don't try to delete symlinks
[elogind.git] / udev_selinux.c
index 6ec359edd4bd64d4578509876784372cde00ef28..94c213d297aca46c0d3927709db2789119bb57fc 100644 (file)
@@ -30,8 +30,8 @@
 #include <errno.h>
 #include <selinux/selinux.h>
 
+#include "udev.h"
 #include "udev_selinux.h"
-#include "logging.h"
 
 static security_context_t prev_scontext = NULL;
 
@@ -152,6 +152,7 @@ void selinux_init(void)
         * restoration creation purposes.
         */
        if (is_selinux_running()) {
+               matchpathcon_init_prefix(NULL, udev_root);
                if (getfscreatecon(&prev_scontext) < 0) {
                        err("getfscreatecon failed\n");
                        prev_scontext = NULL;