diff options
author | NIIBE Yutaka <[email protected]> | 2022-08-01 03:31:29 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2022-08-01 03:31:29 +0000 |
commit | 6e5d70b648c007dbfeb015db91e49640e44a0c9f (patch) | |
tree | 8aec09112bd2711f363b3b0c26a45bfe711db791 | |
parent | Support specifying the pipe name by the option. (diff) | |
download | gnupg-6e5d70b648c007dbfeb015db91e49640e44a0c9f.tar.gz gnupg-6e5d70b648c007dbfeb015db91e49640e44a0c9f.zip |
Add call to GetNamedPipeClientProcessId for newer Windows.
Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r-- | agent/gpg-agent.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c index 9ef00cb9d..5b3a78519 100644 --- a/agent/gpg-agent.c +++ b/agent/gpg-agent.c @@ -2818,6 +2818,16 @@ win32_openssh_thread (void *arg) break; } +#if _WIN32_WINNT >= 0x600 + if (!GetNamedPipeClientProcessId (pipe, &ctrl->client_pid)) + log_info ("failed to get client process id: %ld\n", GetLastError ()); + else + { + log_info ("PID: %ld\n", ctrl->client_pid); + ctrl->client_uid = -1; + } +#endif + ctrl->session_env = session_env_new (); if (!ctrl->session_env) { |