chiark / gitweb /
agent: Serialize access to passphrase cache.
authorNIIBE Yutaka <gniibe@fsij.org>
Thu, 6 Apr 2017 23:39:26 +0000 (08:39 +0900)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Mon, 18 Sep 2017 20:41:12 +0000 (21:41 +0100)
commitad6d38f80c9b9ae022b830402a55ea6e4b2dc3d1
tree77808d294c2b74e7d5d618b4ab8bc59952ca4dba
parent6b7da8e84d8f3f246b3904d862c53a0214201fa1
agent: Serialize access to passphrase cache.

* agent/cache.c (encryption_lock): Remove.
(cache_lock): New.  Now, we have coarse grain lock to serialize
entire cache access.
(initialize_module_cache): Use CACHE_LOCK.
(init_encryption, new_data): Remove ENCRYPTION_LOCK.
(agent_flush_cache, agent_put_cache, agent_get_cache): Lock the cache.

--

GnuPG-bug-id: 3027
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
(cherry picked from commit ebe12be034f052cdec871f0d8ad1bfab85d7b943)

Gbp-Pq: Name 0064-agent-Serialize-access-to-passphrase-cache.patch
agent/cache.c