From: Lennart Poettering Date: Tue, 20 Feb 2024 11:47:31 +0000 (+0100) Subject: importd: port importd over to new invoke_callout_binary() API X-Git-Tag: v256-rc1~762^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0afd4e7337d7463e1a9d91d47a5d9b5067d7a6b;p=thirdparty%2Fsystemd.git importd: port importd over to new invoke_callout_binary() API --- diff --git a/src/import/importd.c b/src/import/importd.c index 3321155e84f..d25c23c6dc5 100644 --- a/src/import/importd.c +++ b/src/import/importd.c @@ -6,6 +6,7 @@ #include "sd-bus.h" #include "alloc-util.h" +#include "build-path.h" #include "bus-common-errors.h" #include "bus-get-properties.h" #include "bus-log-control-api.h" @@ -475,8 +476,10 @@ static int transfer_start(Transfer *t) { cmd[k++] = t->local; cmd[k] = NULL; - execv(cmd[0], (char * const *) cmd); - log_error_errno(errno, "Failed to execute %s tool: %m", cmd[0]); + assert(k < ELEMENTSOF(cmd)); + + r = invoke_callout_binary(cmd[0], (char * const *) cmd); + log_error_errno(r, "Failed to execute %s tool: %m", cmd[0]); _exit(EXIT_FAILURE); }