diff options
author | Werner Koch <wk@gnupg.org> | 2015-02-04 10:09:28 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2015-02-04 10:28:38 +0100 |
commit | 0de5c6a9a783ed9dc69cecbf34eadcaace4be243 (patch) | |
tree | 62db1cc6a50ba5448a0dbe352e6b721efbca0d76 /agent/gpg-agent.c | |
parent | w32: Add manifest to gpg. (diff) | |
download | gnupg2-0de5c6a9a783ed9dc69cecbf34eadcaace4be243.tar.xz gnupg2-0de5c6a9a783ed9dc69cecbf34eadcaace4be243.zip |
gpg-agent: Use "pinentry-basic" as fallback.
* common/homedir.c (get_default_pinentry_name): New.
(gnupg_module_name): Use that for the default pinentry.
(gnupg_module_name_flush_some): New.
* agent/gpg-agent.c (agent_sighup_action): Flush some module names.
* agent/call-pinentry.c (start_pinentry): Do not modify
opt.pinentry_program.
--
The idea with this change is that under Windows we can install a
simple native Windows pinentry as "pinentry-basic" and a full GUI
version may then later install pinentry-gtk etc which would then
automatically be used.
Unfortunately installing another pinentry from a different package
would clobber the GnuPG core directory which is not nice. To fix that
we would need to agree on standard installation directories for GUIs
to also look there.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'agent/gpg-agent.c')
-rw-r--r-- | agent/gpg-agent.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c index a874e76c2..6e1c76e20 100644 --- a/agent/gpg-agent.c +++ b/agent/gpg-agent.c @@ -1827,9 +1827,14 @@ agent_sighup_action (void) { log_info ("SIGHUP received - " "re-reading configuration and flushing cache\n"); + agent_flush_cache (); reread_configuration (); agent_reload_trustlist (); + /* We flush the module name cache so that after installing a + "pinentry" binary that one can be used in case the + "pinentry-basic" fallback was in use. */ + gnupg_module_name_flush_some (); } |