From: kay.sievers@vrfy.org Date: Mon, 29 Nov 2004 03:47:59 +0000 (+0100) Subject: [PATCH] handle /etc/hotplug.d/ only if the event comes from udevd X-Git-Tag: 047~21 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=927bda379205dfccd2fae8f5c54523230e0771a9;p=systemd [PATCH] handle /etc/hotplug.d/ only if the event comes from udevd --- diff --git a/udev.c b/udev.c index ca79bb4e..507f2be9 100644 --- a/udev.c +++ b/udev.c @@ -61,6 +61,10 @@ static int manage_hotplug_event(void) { int fd; int len; + /* false, if we are called directly */ + if (!getenv("MANAGED_EVENT")) + goto exit; + fd = open("/proc/sys/kernel/hotplug", O_RDONLY); if (fd < 0) goto exit;