aboutsummaryrefslogtreecommitdiffstats
path: root/agent/command-ssh.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2018-03-26 14:57:04 +0000
committerWerner Koch <[email protected]>2018-03-26 14:57:04 +0000
commit456a3a8e93ea14f821e0e98fb515f284ece98685 (patch)
treefcef497177f57770b933ddbd7e06182a11baa2ba /agent/command-ssh.c
parentgpg: Disable unused code parts in tdbio.c (diff)
downloadgnupg-456a3a8e93ea14f821e0e98fb515f284ece98685.tar.gz
gnupg-456a3a8e93ea14f821e0e98fb515f284ece98685.zip
gpg: Fix trustdb updates without lock held.
* g10/tdbio.c (is_locked): Turn into a counter. (take_write_lock, release_write_lock): Implement recursive locks. -- On trustdb creation we have this call sequence: init_trustdb -> takes lock tdbio_set_dbname create_version_record tdbio_write_record put_record_into_cache -> takes lock put_record_into_cache -> releases lock init_trustdb -> releases lock The second take lock does noting but the first release lock has already released the lock and the second release lock is a thus a NOP. This is likely the cause for the corrupted trustdb as reported in GnuPG-bug-id: 3839 Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'agent/command-ssh.c')
0 files changed, 0 insertions, 0 deletions