summaryrefslogtreecommitdiff
path: root/udev.c
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2004-11-29 04:47:59 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 23:00:29 -0700
commit927bda379205dfccd2fae8f5c54523230e0771a9 (patch)
treed69e747faf854448d3306e3859f9d2c87a4e7d25 /udev.c
parent2af003feb21e79b68b048c212bb898b293b75421 (diff)
[PATCH] handle /etc/hotplug.d/ only if the event comes from udevd
Diffstat (limited to 'udev.c')
-rw-r--r--udev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/udev.c b/udev.c
index ca79bb4ec0..507f2be943 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;