From: Zbigniew Jędrzejewski-Szmek Date: Fri, 23 Apr 2021 10:39:03 +0000 (+0200) Subject: core/service: fix deserialization of non-absolute commands X-Git-Tag: v249-rc1~342^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1a128a468ddd1070651478c36eae76e31f580b67;p=thirdparty%2Fsystemd.git core/service: fix deserialization of non-absolute commands We'd fail with: Apr 23 10:58:26 systemd[1]: Deserializing state... Apr 23 10:58:26 systemd[1]: testsuite-01.service: Failed to parse serialized command "ExecStart 0 sh "sh" "-e" "-x" "-c" "systemctl --state=failed --no-legend --no-pager >/failed ; systemctl daemon-reload ; echo OK >/testok"": Invalid argument Apr 23 10:58:26 systemd[1]: testsuite-01.service: Reinstalled deserialized job testsuite-01.service/start as 209 This was missed in 5008da1ec1, and apparently nobody noticed until now :( --- diff --git a/src/core/service.c b/src/core/service.c index d5f79d274ef..f346e38b662 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -2783,9 +2783,6 @@ static int service_deserialize_exec_command( case STATE_EXEC_COMMAND_PATH: path = TAKE_PTR(arg); state = STATE_EXEC_COMMAND_ARGS; - - if (!path_is_absolute(path)) - return -EINVAL; break; case STATE_EXEC_COMMAND_ARGS: r = strv_extend(&argv, arg);