X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udevsend.c;h=341ed4cc36e033814812855b06bb76141dd0cf1d;hb=9af5bb2f8fdbf54c064ddbd319d61092f28a4132;hp=9f324077b3b92ee6d3e67f53363ff28566193099;hpb=13f24d596c5638443ffc7bc48c10a66758335c74;p=elogind.git diff --git a/udevsend.c b/udevsend.c index 9f324077b..341ed4cc3 100644 --- a/udevsend.c +++ b/udevsend.c @@ -36,7 +36,6 @@ #include #include "udev.h" -#include "udev_lib.h" #include "udev_version.h" #include "udevd.h" #include "logging.h" @@ -132,6 +131,12 @@ int main(int argc, char *argv[], char *envp[]) goto exit; } + /* prevent loops in the scripts we execute */ + if (getenv("MANAGED_EVENT") != NULL) { + dbg("seems that the event source is not the kernel, just exit"); + goto exit; + } + sock = socket(AF_LOCAL, SOCK_DGRAM, 0); if (sock == -1) { dbg("error getting socket");