diff options
author | Werner Koch <[email protected]> | 2017-10-18 16:28:52 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2017-10-19 13:02:28 +0000 |
commit | 7c73db3d31c6457dfbdc82a8dc89951c023f0603 (patch) | |
tree | c9a14778d15e4cb06b617fe772f1225c12460183 /dirmngr/ks-engine-http.c | |
parent | gpg: Improve keydb handling in the main import function. (diff) | |
download | gnupg-7c73db3d31c6457dfbdc82a8dc89951c023f0603.tar.gz gnupg-7c73db3d31c6457dfbdc82a8dc89951c023f0603.zip |
gpg: Keep a lock during the read-update/insert cycle in import.
* g10/keydb.c (keydb_handle): New field 'keep_lock'.
(keydb_release): Clear that flag.
(keydb_lock): New function.
(unlock_all): Skip if KEEP_LOCK is set.
* g10/getkey.c (get_keyblock_byfprint_fast): Call keep_lock if
requested.
--
That change is straightforward. It helps to avoid the race condition
that another gpg process inserts a key while the first process is
between the search and the insert.
A similar change is due for gpgsm.
Note that the key edit operations may still suffer from a race.
GnuPG-bug-id: 3446
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions