]> git.ipfire.org Git - thirdparty/systemd.git/commit
service: attempt to execute next main command only for oneshot services (#6619)
authorMichal Sekletar <msekletar@users.noreply.github.com>
Fri, 25 Aug 2017 13:36:10 +0000 (15:36 +0200)
committerEvgeny Vereshchagin <evvers@ya.ru>
Fri, 25 Aug 2017 13:36:10 +0000 (16:36 +0300)
commitb58aeb70dbd1cab5908b003ef5187da1fc241839
tree0a55da22d123070b1739e0df99c1121c30783ab9
parent521d3679c1b2b5478e53e97b6c9160a588de85bb
service: attempt to execute next main command only for oneshot services (#6619)

This commit fixes crash described in
https://github.com/systemd/systemd/issues/6533

Multiple ExecStart lines are allowed only for oneshot services
anyway so it doesn't make sense to call service_run_next_main() with
services of type other than SERVICE_ONESHOT.

Referring back to reproducer from the issue, previously we didn't observe
this problem because s->main_command was reset after daemon-reload hence
we never reached the assert statement in service_run_next_main().

Fixes #6533
src/core/service.c
test/test-exec-deserialization.py