From: Mike Yuan Date: Mon, 12 May 2025 15:07:47 +0000 (+0200) Subject: core/dbus-execute: always normalize argv[0] to "sh" on EXEC_COMMAND_VIA_SHELL X-Git-Tag: v258-rc1~641^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f76b0293125bb89b05a01da921966840ae4a9f29;p=thirdparty%2Fsystemd.git core/dbus-execute: always normalize argv[0] to "sh" on EXEC_COMMAND_VIA_SHELL Addresses https://github.com/systemd/systemd/pull/37071#discussion_r2084851759 --- diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c index f7b2932e07a..d0281cc236d 100644 --- a/src/core/dbus-execute.c +++ b/src/core/dbus-execute.c @@ -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)