]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/service.c
pid1: fix serialization/deserialization of commmands with spaces
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 8 Jul 2019 12:18:46 +0000 (14:18 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 8 Jul 2019 23:25:35 +0000 (01:25 +0200)
commit334c0979f37adab7cf6df01cff1ee818bf72d7b2
tree06ecd1390d54449a919b5a0380de7135d595a380
parentcd132992bb52b921387289006cb8eb481e7d33a1
pid1: fix serialization/deserialization of commmands with spaces

Fixes #12258.

This is enough to reproduce:
$ systemd-run bash -c 'sleep 10' && systemctl daemon-reload
would result in
Current command vanished from the unit file.

We would serialize as:
ExecStart 0 /usr/bin/bash /usr/bin/bash -c sleep 10000
which of course can't work.
Now we serialize as
ExecStart 0 /usr/bin/bash "/usr/bin/bash" "-c" "sleep 10".
src/core/service.c