aboutsummaryrefslogtreecommitdiffstats
path: root/agent/protect-tool.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2018-03-27 06:40:58 +0000
committerWerner Koch <[email protected]>2018-03-27 06:40:58 +0000
commit02dce8c0cc57deb2095a9b06aeb8f4dea34eef7e (patch)
tree87bd5eb853bc750761788900a67b602817ebcbfd /agent/protect-tool.c
parentgpg: Auto-fix a broken trustdb with just the version record. (diff)
downloadgnupg-02dce8c0cc57deb2095a9b06aeb8f4dea34eef7e.tar.gz
gnupg-02dce8c0cc57deb2095a9b06aeb8f4dea34eef7e.zip
agent: Make the request origin a part of the cache items.
* agent/cache.c (agent_put_cache): Add arg 'ctrl' and change all callers to pass it. (agent_get_cache): Ditto. * agent/cache.c (struct cache_items_s): Add field 'restricted'. (housekeeping): Adjust debug output. (agent_flush_cache): Ditto. (agent_put_cache): Ditto. Take RESTRICTED into account. (agent_get_cache): Ditto. -- If requests are coming from different sources they should not share the same cache. This way we make sure that a Pinentry pops up for a remote request to a key we have already used locally. GnuPG-bug-id: 3858 Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'agent/protect-tool.c')
-rw-r--r--agent/protect-tool.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/agent/protect-tool.c b/agent/protect-tool.c
index a193e4969..ec7b47695 100644
--- a/agent/protect-tool.c
+++ b/agent/protect-tool.c
@@ -749,8 +749,9 @@ agent_key_available (const unsigned char *grip)
}
char *
-agent_get_cache (const char *key, cache_mode_t cache_mode)
+agent_get_cache (ctrl_t ctrl, const char *key, cache_mode_t cache_mode)
{
+ (void)ctrl;
(void)key;
(void)cache_mode;
return NULL;