diff options
author | Werner Koch <[email protected]> | 2013-01-30 11:00:29 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2013-01-30 11:00:29 +0000 |
commit | 1cd6445eec4c3642ad92afb02f3563a01cc10c10 (patch) | |
tree | e2db848fa90707c6dd8946955db99d080b85214f /g10/call-agent.c | |
parent | agent: Fix a bug of handling return code from npth_join. (diff) | |
download | gnupg-1cd6445eec4c3642ad92afb02f3563a01cc10c10.tar.gz gnupg-1cd6445eec4c3642ad92afb02f3563a01cc10c10.zip |
gpg: Add status line PINENTRY_LAUNCHED.
* common/status.h (STATUS_PINENTRY_LAUNCHED): New.
* g10/server.c (server_local_s): Add field allow_pinentry_notify.
(option_handler): Add option "allow-pinentry-notify".
(gpg_proxy_pinentry_notify): New.
* g10/call-agent.c (default_inq_cb): Factor code out to the new
function.
Diffstat (limited to 'g10/call-agent.c')
-rw-r--r-- | g10/call-agent.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/g10/call-agent.c b/g10/call-agent.c index 55637e463..a4d1dbb13 100644 --- a/g10/call-agent.c +++ b/g10/call-agent.c @@ -307,14 +307,15 @@ get_serialno_cb (void *opaque, const char *line) static gpg_error_t default_inq_cb (void *opaque, const char *line) { - (void)opaque; + gpg_error_t err; + ctrl_t ctrl = opaque; if (!strncmp (line, "PINENTRY_LAUNCHED", 17) && (line[17]==' '||!line[17])) { - /* There is no working server mode yet thus we use - AllowSetForegroundWindow window right here. We might want to - do this anyway in case gpg is called on the console. */ - gnupg_allow_set_foregound_window ((pid_t)strtoul (line+17, NULL, 10)); + err = gpg_proxy_pinentry_notify (ctrl, line); + if (err) + log_error (_("failed to proxy %s inquiry to client\n"), + "PINENTRY_LAUNCHED"); /* We do not pass errors to avoid breaking other code. */ } else |