On Wed, 22.04.15 23:20, Martin Pitt (martin.p...@ubuntu.com) wrote:

> Hello all,
> 
> today I got a report about crashing systemd (pid 1) by installing a
> package with a broken unit file. Rebooting also doesn't work as
> systemd immediately crashes again. It turns out the unit file used a
> multi-line ExecStart= with ' quoting where the author (accidentally)
> added a trailing slash after the usual \ escaping of the newline:
> 
> ---------- snip ---------
> [Unit]
> Description=test
> 
> [Service]
> ExecStart=/bin/echo 'foo \ 
>     bar'
> ---------- snip ---------
> 
> Instead of actually breaking your machine, you can just copy that unit
> to e. g. /tmp and then run "systemd-analyze verify test.service" to
> get the same assertion.
> 
> Of course this syntax is invalid, but systemd certainly shouldn't
> spill its guts that hard, but just reject the broken .service file.
> 
> Simple fix with test case attached.

Thanks! Applied!

We really should get rid of split() entirely. The code is ugly, and it
pretends to do quoting, but actually doesn't do it properly. An
unquote_first_word() loop is really the much better option.

Would love if somebody would sit down and port this all over...

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to