aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2022-11-07 01:00:28 +0000
committerNIIBE Yutaka <[email protected]>2022-11-07 01:00:28 +0000
commit07adf41f0f49233cc4842bad1e6d2fdc9dc431af (patch)
tree96009fb60a25045e4787241edf05f845edfc9987
parentw32: Support sendfd/recvfd through pipe connection. (diff)
downloadlibassuan-07adf41f0f49233cc4842bad1e6d2fdc9dc431af.tar.gz
libassuan-07adf41f0f49233cc4842bad1e6d2fdc9dc431af.zip
Show the pid of listening process in the hello line.
* src/assuan-listen.c (assuan_accept): Use getpid instead of assuan_get_pid. -- This changes the initial interaction. Before the change, the PID of peer was shown from listening process (but not used at all, in the code). That is, it was the PID of connecting process. After the change, the PID of listening process is shown, which can be used by connecting process. GnuPG-bug-id: 6236 Fixes-commit: a00b1ede5403f1e38534cc3b232739f20b8567e9 Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r--src/assuan-listen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/assuan-listen.c b/src/assuan-listen.c
index 6755d59..93560ff 100644
--- a/src/assuan-listen.c
+++ b/src/assuan-listen.c
@@ -117,7 +117,7 @@ assuan_accept (assuan_context_t ctx)
else
{
static char const okstr[] = "OK Pleased to meet you";
- pid_t apid = assuan_get_pid (ctx);
+ pid_t apid = getpid ();
if (apid != ASSUAN_INVALID_PID)
{
char tmpbuf[50];