summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2022-04-07 09:39:40 +0200
committerNIIBE Yutaka <gniibe@fsij.org>2022-04-07 09:39:40 +0200
commit90000819641c9011b0c0c19f5404a88bf8c34acc (patch)
tree823580397ea377200a48c79c04fb1e3b7689fbfb
parentw32: Exclude tests with HOME. (diff)
downloadgnupg2-90000819641c9011b0c0c19f5404a88bf8c34acc.tar.xz
gnupg2-90000819641c9011b0c0c19f5404a88bf8c34acc.zip
agent: Fix for possible support of Cygwin OpenSSH.
* agent/command-ssh.c (start_command_handler_ssh): Use es_sysopen. -- With new (not-yet-released) libgpg-error, gpg-agent should be able to handle connection from Cygwin version of OpenSSH. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
-rw-r--r--agent/command-ssh.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/agent/command-ssh.c b/agent/command-ssh.c
index f8b00c688..a7784e728 100644
--- a/agent/command-ssh.c
+++ b/agent/command-ssh.c
@@ -3671,6 +3671,10 @@ start_command_handler_ssh (ctrl_t ctrl, gnupg_fd_t sock_client)
gpg_error_t err;
int ret;
struct peer_info_s peer_info;
+ es_syshd_t syshd;
+
+ syshd.type = ES_SYSHD_SOCK;
+ syshd.u.sock = sock_client;
err = agent_copy_startup_env (ctrl);
if (err)
@@ -3681,7 +3685,7 @@ start_command_handler_ssh (ctrl_t ctrl, gnupg_fd_t sock_client)
ctrl->client_uid = peer_info.uid;
/* Create stream from socket. */
- stream_sock = es_fdopen (FD2INT(sock_client), "r+");
+ stream_sock = es_sysopen (&syshd, "r+");
if (!stream_sock)
{
err = gpg_error_from_syserror ();