diff options
author | Lennart Poettering <lennart@poettering.net> | 2024-02-20 12:47:31 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2024-02-21 09:25:46 +0100 |
commit | a0afd4e7337d7463e1a9d91d47a5d9b5067d7a6b (patch) | |
tree | 34dbec61baa9a305c026d6ce6f6f99f55cbcda06 /src/import | |
parent | homed: port to use new invoke_callout_binary() API (diff) | |
download | systemd-a0afd4e7337d7463e1a9d91d47a5d9b5067d7a6b.tar.xz systemd-a0afd4e7337d7463e1a9d91d47a5d9b5067d7a6b.zip |
importd: port importd over to new invoke_callout_binary() API
Diffstat (limited to 'src/import')
-rw-r--r-- | src/import/importd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/import/importd.c b/src/import/importd.c index 3321155e84..d25c23c6dc 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); } |