From: Michael Vogt Date: Thu, 26 Mar 2026 15:32:48 +0000 (+0100) Subject: varlink: tweak exec_with_listen_fds() log generation X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F41283%2Fhead;p=thirdparty%2Fsystemd.git varlink: tweak exec_with_listen_fds() log generation The previous code used strv_join() when it generated the log message for `varlinkctl --exec`. However this can lead to inaccurate logging so use `quote_command_line()` instead. Thanks to Lennart for suggesting this. --- diff --git a/src/varlinkctl/varlinkctl.c b/src/varlinkctl/varlinkctl.c index 979797f8ecd..4495d090dfc 100644 --- a/src/varlinkctl/varlinkctl.c +++ b/src/varlinkctl/varlinkctl.c @@ -12,6 +12,7 @@ #include "bus-util.h" #include "chase.h" #include "env-util.h" +#include "escape.h" #include "fd-util.h" #include "fileio.h" #include "format-table.h" @@ -653,7 +654,7 @@ static int upgrade_forward_done(SocketForward *sf, int error, void *userdata) { _noreturn_ static void exec_with_listen_fds(char **exec_cmdline, int *fds, size_t n_fds) { int r; - _cleanup_free_ char *j = strv_join(exec_cmdline, " "); + _cleanup_free_ char *j = quote_command_line(exec_cmdline, SHELL_ESCAPE_EMPTY); if (!j) { log_oom(); _exit(EXIT_FAILURE);