[git] GnuPG - branch, master, updated. gnupg-2.1.0-55-gf1c3eb4

by Werner Koch cvs at cvs.gnupg.org
Mon Dec 1 11:54:21 CET 2014


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, master has been updated
       via  f1c3eb4b16ca43b5d3712a3b54c22d17ce85af47 (commit)
      from  2f90b7c21b2f84ca2bf5f4555da9233e84606b4e (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 f1c3eb4b16ca43b5d3712a3b54c22d17ce85af47
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Dec 1 11:54:51 2014 +0100

    gpg: Fix export bug using exact search with only one key in the keybox.
    
    * g10/export.c (do_export_stream): Disable caching.
    * g10/keyserver.c (keyidlist): Ditto.
    --
    
    GnuPG-bug-id: 1774

diff --git a/g10/export.c b/g10/export.c
index a92eace..b65fb8d 100644
--- a/g10/export.c
+++ b/g10/export.c
@@ -804,6 +804,8 @@ do_export_stream (ctrl_t ctrl, iobuf_t out, strlist_t users, int secret,
                        sl->d, gpg_strerror (err));
         }
 
+      keydb_disable_caching (kdbhd);  /* We are looping the search.  */
+
       /* It would be nice to see which of the given users did actually
          match one in the keyring.  To implement this we need to have
          a found flag for each entry in desc.  To set this flag we
diff --git a/g10/keydb.c b/g10/keydb.c
index bafae18..a578c7c 100644
--- a/g10/keydb.c
+++ b/g10/keydb.c
@@ -1424,6 +1424,9 @@ keydb_search (KEYDB_HANDLE hd, KEYDB_SEARCH_DESC *desc,
   if (DBG_CACHE)
     dump_search_desc (hd, "keydb_search", desc, ndesc);
 
+  /* NB: If one of the exact search modes below is used in a loop to
+     walk over all keys (with the same fingerprint) the caching must
+     have been disabled for the handle.  */
   if (!hd->no_caching
       && ndesc == 1
       && (desc[0].mode == KEYDB_SEARCH_MODE_FPR20
diff --git a/g10/keyserver.c b/g10/keyserver.c
index 5bc1eba..e3ad707 100644
--- a/g10/keyserver.c
+++ b/g10/keyserver.c
@@ -1229,7 +1229,8 @@ keyidlist(strlist_t users,KEYDB_SEARCH_DESC **klist,int *count,int fakev3)
 
   *klist=xmalloc(sizeof(KEYDB_SEARCH_DESC)*num);
 
-  kdbhd=keydb_new ();
+  kdbhd = keydb_new ();
+  keydb_disable_caching (kdbhd);  /* We are looping the search.  */
 
   if(!users)
     {

-----------------------------------------------------------------------

Summary of changes:
 g10/export.c    |    2 ++
 g10/keydb.c     |    3 +++
 g10/keyserver.c |    3 ++-
 3 files changed, 7 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list