From a0afd4e7337d7463e1a9d91d47a5d9b5067d7a6b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 20 Feb 2024 12:47:31 +0100 Subject: [PATCH] importd: port importd over to new invoke_callout_binary() API --- src/import/importd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); } -- 2.47.3