core/dbus-execute: always normalize argv[0] to "sh" on EXEC_COMMAND_VIA_SHELL

Addresses https://github.com/systemd/systemd/pull/37071#discussion_r2084851759
This commit is contained in:
Mike Yuan
2025-05-12 17:09:08 +02:00
parent 5e24ebace2
commit f76b029312
+1 -1
View File
@@ -1551,7 +1551,7 @@ int bus_set_transient_exec_command(
path = _PATH_BSHELL;
if (strv_isempty(argv))
r = strv_extend(&argv, path);
r = strv_extend(&argv, "sh");
else
r = free_and_strdup(&argv[0], argv[0][0] == '-' ? "-sh" : "sh");
if (r < 0)