core/dbus-execute: actually set PassEnvironment= (#7510)
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 30 Nov 2017 11:34:58 +0000 (20:34 +0900)
committerLennart Poettering <lennart@poettering.net>
Thu, 30 Nov 2017 11:34:58 +0000 (12:34 +0100)
Follow-up for #7444.

src/core/dbus-execute.c

index 14fb46e..197c1c3 100644 (file)
@@ -2274,6 +2274,10 @@ int bus_exec_context_set_transient_property(
                         } else {
                                 _cleanup_free_ char *joined = NULL;
 
+                                r = strv_extend_strv(&c->pass_environment, l, true);
+                                if (r < 0)
+                                        return r;
+
                                 /* We write just the new settings out to file, with unresolved specifiers. */
                                 joined = unit_concat_strv(l, UNIT_ESCAPE_SPECIFIERS);
                                 if (!joined)