From 2b19474aab8f2201f896ead44cd72ac06405aa71 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Tue, 9 Jul 2024 15:15:13 +0900 Subject: common: On Windows, we care about how PIPE handles are inherited. * agent/gpg-agent.c (handle_connections): It's for POSIX. * kbx/keyboxd.c (handle_connections): Ditto. * scd/app.c (handle_connections): Ditto. * scd/scdaemon.c (handle_connections): Ditto. tpm2d/tpm2daemon.c (handle_connections): Ditto. * tests/gpgscm/ffi.c (do_pipe): Use GNUPG_PIPE_BOTH. (do_inbound_pipe): Use GNUPG_PIPE_INBOUND. (do_outbound_pipe): Use GNUPG_PIPE_OUTBOUND. * common/call-gpg.c (_gpg_encrypt): Specify outbound and inbound. (_gpg_decrypt): Likewise. * common/exechelp-posix.c (gnupg_create_pipe): Add an argument. * common/exechelp-w32.c (create_pipe_and_estream): Care about how PIPE handles are inherited to child process. (gnupg_create_pipe): Add an argument. * common/exechelp.h: Add enum values. -- Fixes-commit: af6c47b2910f394faf582800d60d88e9b4dcf834 Signed-off-by: NIIBE Yutaka --- scd/app.c | 2 +- scd/scdaemon.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'scd') diff --git a/scd/app.c b/scd/app.c index 625f9b914..c2ff50285 100644 --- a/scd/app.c +++ b/scd/app.c @@ -2649,7 +2649,7 @@ initialize_module_command (void) #ifdef HAVE_W32_SYSTEM scd_init_event (&card_list_lock.the_event, card_list_lock.events); #else - ret = gnupg_create_pipe (card_list_lock.notify_pipe); + ret = gnupg_create_pipe (card_list_lock.notify_pipe, 0); if (ret) { err = gpg_error_from_syserror (); diff --git a/scd/scdaemon.c b/scd/scdaemon.c index a52dc5a2f..5e08a5abd 100644 --- a/scd/scdaemon.c +++ b/scd/scdaemon.c @@ -1312,7 +1312,7 @@ handle_connections (gnupg_fd_t listen_fd) #ifdef HAVE_PSELECT_NO_EINTR int pipe_fd[2]; - ret = gnupg_create_pipe (pipe_fd); + ret = gnupg_create_pipe (pipe_fd, 0); if (ret) { log_error ("pipe creation failed: %s\n", gpg_strerror (ret)); -- cgit v1.2.3