***/
#include <stdio.h>
-#include <stddef.h>
#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#include <ctype.h>
#include <errno.h>
#include <unistd.h>
-#include <grp.h>
#include <sched.h>
#include <sys/mount.h>
#include <sys/signalfd.h>
#include "missing.h"
+#include "selinux-util.h"
#include "udev.h"
#include "udev-util.h"
-void udev_main_log(struct udev *udev, int priority,
- const char *file, int line, const char *fn,
- const char *format, va_list args) {}
-
static int fake_filesystems(void) {
static const struct fakefs {
const char *src;
return EXIT_FAILURE;
log_debug("version %s", VERSION);
- label_init("/dev");
+ mac_selinux_init("/dev");
sigprocmask(SIG_SETMASK, NULL, &sigmask_orig);
mknod(udev_device_get_devnode(dev), mode, udev_device_get_devnum(dev));
} else {
unlink(udev_device_get_devnode(dev));
- util_delete_path(udev, udev_device_get_devnode(dev));
+ rmdir_parents(udev_device_get_devnode(dev), "/");
}
}
- udev_event_execute_rules(event, 3 * USEC_PER_SEC, USEC_PER_SEC, rules, &sigmask_orig);
- udev_event_execute_run(event, 3 * USEC_PER_SEC, USEC_PER_SEC, NULL);
+ udev_event_execute_rules(event,
+ 3 * USEC_PER_SEC, USEC_PER_SEC,
+ NULL,
+ rules,
+ &sigmask_orig);
+ udev_event_execute_run(event,
+ 3 * USEC_PER_SEC, USEC_PER_SEC,
+ NULL);
out:
if (event != NULL && event->fd_signal >= 0)
close(event->fd_signal);
- label_finish();
+ mac_selinux_finish();
return err ? EXIT_FAILURE : EXIT_SUCCESS;
}