X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udevd.c;h=bd36d2c192d1e606a84b03e75c1689931cb8e7b4;hb=8a0dc204e902a47a5b251c6d4a29eddb8f4a634a;hp=2337493f1ebdf00c37f431b1397f73d8f23fc2b0;hpb=f602ccf0723f116c2c3a77e057a0540027aa38b8;p=elogind.git diff --git a/udevd.c b/udevd.c index 2337493f1..bd36d2c19 100644 --- a/udevd.c +++ b/udevd.c @@ -291,7 +291,7 @@ static void handle_udevsend_msg(int sock) /* copy environment buffer and reconstruct envp */ memcpy(msg->envbuf, usend_msg.envbuf, envbuf_size); bufpos = 0; - for (i = 0; (bufpos < envbuf_size) && (i < HOTPLUG_NUM_ENVP-1); i++) { + for (i = 0; (bufpos < envbuf_size) && (i < HOTPLUG_NUM_ENVP-2); i++) { int keylen; char *key; @@ -314,6 +314,7 @@ static void handle_udevsend_msg(int sock) if (strncmp(key, "SEQNUM=", 7) == 0) msg->seqnum = strtoull(&key[7], NULL, 10); } + msg->envp[i++] = "MANAGED_EVENT=1"; msg->envp[i] = NULL; /* if no seqnum is given, we move straight to exec queue */