]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/execute: escape the separator in exported paths
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 24 Sep 2020 11:07:51 +0000 (13:07 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 25 Sep 2020 11:36:34 +0000 (13:36 +0200)
Our paths shouldn't even contain ":", but let's escape it if one somehow sneaks
in.

src/core/execute.c

index d5a464d6f6ba58c952bb67ac887c2f47b37b99dc..ac19fc0a68e555b4ae59d89aba61a4631484e9ac 100644 (file)
@@ -1927,7 +1927,7 @@ static int build_environment(
                 if (!pre)
                         return -ENOMEM;
 
-                joined = strv_join_full(c->directories[t].paths, ":", pre, false);
+                joined = strv_join_full(c->directories[t].paths, ":", pre, true);
                 if (!joined)
                         return -ENOMEM;