X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udevstart.c;h=d0a1ded2be069cf16d0f8931a840f272875702d2;hb=e3e7358137a35849f81a8e18ca548ded22a2b5cc;hp=e5ce7af0307eefa214a685df3833d2ae5b104c13;hpb=f7ed0d113a964aae8da4ca752d1330704adb1c65;p=elogind.git diff --git a/udevstart.c b/udevstart.c index e5ce7af03..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,7 +148,7 @@ static int add_device(const char *devpath) goto exit; } if (udev->name[0] != '\0') - retval = udev_add_device(udev); + retval = udev_device_event(&rules, udev); else info("device node creation supressed"); @@ -340,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");