From 953dd67368ceaeb8b42cfb8f9b5f3c4de8afdbe0 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Tue, 9 Jul 2024 09:39:15 +0900 Subject: Use gpgrt_process_spawn API from libgpg-error. * agent/genkey.c (do_check_passphrase_pattern): Use the gpgrt API. * common/asshelp.c (start_new_service): Ditto. * common/exechelp.h: Remove gnupg_process_spawn API. * common/exechelp-posix.c: Remove gnupg_process_spawn implementation. * common/exechelp-w32.c: Likewise. * common/exectool.c (gnupg_exec_tool_stream): Use the gpgrt API. * common/t-exechelp.c (test_pipe_stream): Remove. * dirmngr/ldap-wrapper.c (destroy_wrapper, ldap_reaper_thread): Use the gpgrt API. (ldap_wrapper_connection_cleanup, ldap_wrapper): Ditto. * dirmngr/ldap.c, g10/call-keyboxd.c: No need to include exechelp.h. * g10/photoid.c (run_with_pipe, show_photo): Use the gpgrt API. * g13/be-encfs.c (run_umount_helper, run_encfs_tool): Ditto. * g13/g13.c, g13/mount.c, g13/runner.c: No need to include exechelp.h. * scd/apdu.c: No need to include exechelp.h. * scd/app.c (report_change): Use the gpgrt API. * sm/export.c, sm/import.c: No need to include exechelp.h. * tests/gpgscm/ffi.c (proc_object_finalize, proc_wrap) (do_process_spawn_io, do_process_spawn_fd, do_process_wait): Use the gpgrt API. * tools/gpg-auth.c: No need to include exechelp.h. * tools/gpg-card.c (cmd_gpg): Use the gpgrt API. * tools/gpg-connect-agent.c: No need to include exechelp.h. * tools/gpg-mail-tube.c (mail_tube_encrypt, prepare_for_appimage) (start_gpg_encrypt): Use the gpgrt API. * tools/gpgconf-comp.c (gpg_agent_runtime_change) (scdaemon_runtime_change, tpm2daemon_runtime_change) (dirmngr_runtime_change, keyboxd_runtime_change) (gc_component_launch, gc_component_check_options) (retrieve_options_from_program): Ditto. * tools/gpgconf.c (show_versions_via_dirmngr): Ditto. * tools/gpgtar-create.c (gpgtar_create): Ditto. * tools/gpgtar-extract.c (gpgtar_extract): Ditto. * tools/gpgtar-list.c (gpgtar_list): Ditto. -- GnuPG-bug-id: 7192 Signed-off-by: NIIBE Yutaka --- g13/be-encfs.c | 19 +++++++++---------- g13/g13.c | 1 - g13/mount.c | 1 - g13/runner.c | 1 - 4 files changed, 9 insertions(+), 13 deletions(-) (limited to 'g13') diff --git a/g13/be-encfs.c b/g13/be-encfs.c index 04b0b632a..64dfef89c 100644 --- a/g13/be-encfs.c +++ b/g13/be-encfs.c @@ -29,7 +29,6 @@ #include "../common/i18n.h" #include "keyblob.h" #include "../common/sysutils.h" -#include "../common/exechelp.h" #include "runner.h" #include "be-encfs.h" @@ -81,8 +80,8 @@ run_umount_helper (const char *mountpoint) args[1] = mountpoint; args[2] = NULL; - err = gnupg_process_spawn (pgmname, args, - GNUPG_PROCESS_DETACHED, + err = gpgrt_process_spawn (pgmname, args, + GPGRT_PROCESS_DETACHED, NULL, NULL); if (err) log_error ("failed to run '%s': %s\n", @@ -223,7 +222,7 @@ run_encfs_tool (ctrl_t ctrl, enum encfs_cmds cmd, const char *pgmname; const char *argv[10]; int idx; - gnupg_process_t proc; + gpgrt_process_t proc; int inbound, outbound; (void)ctrl; @@ -259,9 +258,9 @@ run_encfs_tool (ctrl_t ctrl, enum encfs_cmds cmd, argv[idx++] = NULL; assert (idx <= DIM (argv)); - err = gnupg_process_spawn (pgmname, argv, - (GNUPG_PROCESS_STDIN_PIPE - | GNUPG_PROCESS_STDERR_PIPE), + err = gpgrt_process_spawn (pgmname, argv, + (GPGRT_PROCESS_STDIN_PIPE + | GPGRT_PROCESS_STDERR_PIPE), NULL, &proc); if (err) { @@ -269,11 +268,11 @@ run_encfs_tool (ctrl_t ctrl, enum encfs_cmds cmd, goto leave; } - err = gnupg_process_get_fds (proc, 0, &outbound, NULL, &inbound); + err = gpgrt_process_get_fds (proc, 0, &outbound, NULL, &inbound); if (err) { log_error ("error get fds '%s': %s\n", pgmname, gpg_strerror (err)); - gnupg_process_release (proc); + gpgrt_process_release (proc); goto leave; } @@ -287,7 +286,7 @@ run_encfs_tool (ctrl_t ctrl, enum encfs_cmds cmd, err = runner_spawn (runner); if (err) { - gnupg_process_release (proc); + gpgrt_process_release (proc); goto leave; } diff --git a/g13/g13.c b/g13/g13.c index 9d9e2e2b0..6018b8a83 100644 --- a/g13/g13.c +++ b/g13/g13.c @@ -40,7 +40,6 @@ #include "../common/gc-opt-flags.h" #include "../common/asshelp.h" #include "../common/init.h" -#include "../common/exechelp.h" #include "keyblob.h" #include "server.h" #include "runner.h" diff --git a/g13/mount.c b/g13/mount.c index 071b76b67..be9b5095c 100644 --- a/g13/mount.c +++ b/g13/mount.c @@ -37,7 +37,6 @@ #include "../common/host2net.h" #include "server.h" /*(g13_keyblob_decrypt)*/ #include "../common/sysutils.h" -#include "../common/exechelp.h" #include "runner.h" #include "call-syshelp.h" diff --git a/g13/runner.c b/g13/runner.c index c0534fe5d..19ed46f52 100644 --- a/g13/runner.c +++ b/g13/runner.c @@ -29,7 +29,6 @@ #include "g13.h" #include "../common/i18n.h" #include "keyblob.h" -#include "../common/exechelp.h" #include "runner.h" #include "mountinfo.h" -- cgit v1.2.3