diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c index 384b23a64..99316653b 100644 --- a/agent/call-pinentry.c +++ b/agent/call-pinentry.c @@ -31,6 +31,7 @@ # include # include # include +# include #endif #include @@ -544,7 +545,16 @@ start_pinentry (ctrl_t ctrl) if (ctrl->client_pid) { char *optstr; - if ((optstr = xtryasprintf ("OPTION owner=%lu", ctrl->client_pid))) + const char *nodename = ""; + +#ifndef HAVE_W32_SYSTEM + struct utsname utsbuf; + if (!uname (&utsbuf)) + nodename = utsbuf.nodename; +#endif /*!HAVE_W32_SYSTEM*/ + + if ((optstr = xtryasprintf ("OPTION owner=%lu %s", + ctrl->client_pid, nodename))) { assuan_transact (entry_ctx, optstr, NULL, NULL, NULL, NULL, NULL, NULL);