aboutsummaryrefslogtreecommitdiffstats
path: root/agent/command.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2018-10-22 15:24:58 +0000
committerWerner Koch <[email protected]>2018-10-22 15:24:58 +0000
commit68b8096b6617cdad09c99d7eda2035176807e78f (patch)
treea6812e52daeca5ca4830355cc41365cac276228c /agent/command.c
parentdirmngr: In verbose mode print the OCSP responder id. (diff)
downloadgnupg-68b8096b6617cdad09c99d7eda2035176807e78f.tar.gz
gnupg-68b8096b6617cdad09c99d7eda2035176807e78f.zip
agent: Fix build regression for Windows.
* agent/command-ssh.c (get_client_info): Turn client_uid into an int. Fix setting of it in case of a failed getsocketopt. * agent/command.c (start_command_handler): Fix setting of the pid and uid for Windows. -- Fixes-commit: 28aa6890588cc108639951bb4bef03ac17743046 which obviously was only added to master. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'agent/command.c')
-rw-r--r--agent/command.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/agent/command.c b/agent/command.c
index 925d1f780..087175335 100644
--- a/agent/command.c
+++ b/agent/command.c
@@ -3588,8 +3588,13 @@ start_command_handler (ctrl_t ctrl, gnupg_fd_t listen_fd, gnupg_fd_t fd)
}
else
{
+#ifdef HAVE_W32_SYSTEM
+ pid = assuan_get_pid (ctx);
+ ctrl->client_uid = -1;
+#else
pid = client_creds->pid;
ctrl->client_uid = client_creds->uid;
+#endif
}
ctrl->client_pid = (pid == ASSUAN_INVALID_PID)? 0 : (unsigned long)pid;
ctrl->server_local->connect_from_self = (pid == getpid ());