1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

gpg,sm: Implement keybox compression run and release lock in gpgsm

* g10/keydb.c (keydb_add_resource): Call keybox_compress.
* sm/keydb.c (keydb_add_resource): Release the lock after a compress.
--

Note that in gpgsm we already did the compress run but we didn't
released the lock on the file.  This might have been a reason for some
strange hangs.

GnuPG-bug-id: 4644
Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2019-08-23 15:51:13 +02:00
parent 5ef0d7a795
commit e64f0dfd72
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
2 changed files with 19 additions and 3 deletions

View file

@ -362,7 +362,10 @@ keydb_add_resource (ctrl_t ctrl, const char *url, int force, int *auto_created)
if (kbxhd)
{
if (!keybox_lock (kbxhd, 1, 0))
keybox_compress (kbxhd);
{
keybox_compress (kbxhd);
keybox_lock (kbxhd, 0, 0);
}
keybox_release (kbxhd);
}