From 68b8096b6617cdad09c99d7eda2035176807e78f Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 22 Oct 2018 17:24:58 +0200 Subject: 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 --- agent/command.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'agent/command.c') 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 ()); -- cgit