hotplug-dispatch: don't filter empty env variables
authorDaniel Golle <daniel@makrotopia.org>
Wed, 21 Feb 2024 00:06:37 +0000 (00:06 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Wed, 21 Feb 2024 00:08:41 +0000 (00:08 +0000)
Empty environment variables are a valid case and are needed to
override (or remove) existing variables such as HOSTNAME.

Reported-by: Hartmut Birr <e9hack@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
hotplug-dispatch.c

index f1ece3833f235d59b321d6d9bd89ea3ef621fcd9..47060852ea909bc2e389003d30722682bc492eda 100644 (file)
@@ -241,9 +241,6 @@ static int hotplug_call(struct ubus_context *ctx, struct ubus_object *obj,
                        continue;
                *tmp = '=';
 
-               if (!strlen(++tmp))
-                       continue;
-
                if (!strcmp(enve, "ASYNC=0"))
                        async = false;