[git] GnuPG - branch, STABLE-BRANCH-2-0, updated. gnupg-2.0.30-4-g00d737e
by Niibe Yutaka
cvs at cvs.gnupg.org
Wed Jun 15 02:03:16 CEST 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".
The branch, STABLE-BRANCH-2-0 has been updated
via 00d737e3fde84e7df7ba19080c83237b769cd0d0 (commit)
from d8775285e94b23f8e56a2997f9491dc486d74d79 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 00d737e3fde84e7df7ba19080c83237b769cd0d0
Author: Niibe Yutaka <gniibe at fsij.org>
Date: Wed Jun 15 08:41:56 2016 +0900
g10: Fix another race condition for trustdb access.
* g10/tdbio.c (create_version_record): Call create_hashtable to always
make hashtable, together with the version record.
(get_trusthashrec): Remove call to create_hashtable.
--
GnuPG-bug-id: 1675
Thanks to Scott Moser to reproducible script and patience.
Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
(backport from master
commit 35a3ce2acf78a95fecbccfd8db0560cca24232df)
diff --git a/g10/tdbio.c b/g10/tdbio.c
index 5c2fdd1..725c3c2 100644
--- a/g10/tdbio.c
+++ b/g10/tdbio.c
@@ -92,6 +92,7 @@ static int db_fd = -1;
static int in_transaction;
static void open_db(void);
+static void create_hashtable (TRUSTREC *vr, int type);
static int
take_write_lock (void)
@@ -471,6 +472,10 @@ create_version_record (void)
rc = tdbio_write_record( &rec );
if( !rc )
tdbio_sync();
+
+ if (!rc)
+ create_hashtable (&rec, 0);
+
return rc;
}
@@ -763,8 +768,6 @@ get_trusthashrec(void)
if( rc )
log_fatal( _("%s: error reading version record: %s\n"),
db_name, g10_errstr(rc) );
- if( !vr.r.ver.trusthashtbl )
- create_hashtable( &vr, 0 );
trusthashtbl = vr.r.ver.trusthashtbl;
}
-----------------------------------------------------------------------
Summary of changes:
g10/tdbio.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list