X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=udevstart.c;h=d0a1ded2be069cf16d0f8931a840f272875702d2;hp=d9d6a7b5211f143cfe5d8355b04e4717808a8508;hb=a1e6bd93d3d650c2064daafdb253120ae6e89398;hpb=4cfdeaf3bf82b50fb6af123511d2f94078fe7df2 diff --git a/udevstart.c b/udevstart.c index d9d6a7b52..d0a1ded2b 100644 --- a/udevstart.c +++ b/udevstart.c @@ -40,6 +40,7 @@ #include "udev.h" #include "udev_rules.h" +#include "udev_selinux.h" static const char *udev_run_str; static const char *udev_log_str; @@ -130,7 +131,6 @@ static int add_device(const char *devpath) /* override built-in sysfs device */ udev->dev = dev; strcpy(udev->action, "add"); - udev->devt = udev_device_get_devt(udev); if (strcmp(udev->dev->subsystem, "net") != 0) { udev->devt = udev_device_get_devt(udev); @@ -148,13 +148,11 @@ static int add_device(const char *devpath) goto exit; } if (udev->name[0] != '\0') - retval = udev_add_device(udev); - else { + retval = udev_device_event(&rules, udev); + else info("device node creation supressed"); - goto exit; - } - if (retval == 0 && !udev->ignore_device && udev_run) { + if (retval == 0 && udev_run) { struct name_entry *name_loop; dbg("executing run list"); @@ -342,6 +340,7 @@ int main(int argc, char *argv[], char *envp[]) logging_init("udevstart"); udev_config_init(); + selinux_init(); dbg("version %s", UDEV_VERSION); udev_run_str = getenv("UDEV_RUN");