[git] GnuPG - branch, master, updated. gnupg-2.1.9-133-g8e2bea2

by Neal H. Walfield cvs at cvs.gnupg.org
Mon Nov 16 10:34:22 CET 2015


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  8e2bea22b0927f4f95a248cc7517f407a705d8a8 (commit)
      from  3689c2105aab6a4304e9464c5b20207d69b9a133 (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 8e2bea22b0927f4f95a248cc7517f407a705d8a8
Author: Neal H. Walfield <neal at g10code.com>
Date:   Mon Nov 16 10:34:01 2015 +0100

    gpg: Fix error checking and improve error reporting.
    
    * g10/gpg.c (check_user_ids): Differentiate between a second result
    and an error.  If the key specification is ambiguous or an error
    occurs, set RC appropriately.
    
    --
    Signed-off-by: Neal H. Walfield <neal at g10code.com>
    Reported-by: Werner Koch <wk at gnupg.org>
    Suggested-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/g10/gpg.c b/g10/gpg.c
index 36e6542..75060b8 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -2196,8 +2196,8 @@ check_user_ids (strlist_t *sp,
 
       /* Continue the search.  */
       err = keydb_search (hd, &desc, 1, NULL);
-      if (! (gpg_err_code (err) == GPG_ERR_NOT_FOUND
-             || gpg_err_code (err) == GPG_ERR_EOF))
+      if (! err)
+        /* Another result!  */
         {
           char fingerprint_bin2[MAX_FINGERPRINT_LEN];
           size_t fingerprint_bin2_len = sizeof (fingerprint_bin2);
@@ -2208,6 +2208,9 @@ check_user_ids (strlist_t *sp,
           if (!opt.quiet)
             log_info (_("(check argument of option '%s')\n"), option);
 
+          if (! rc)
+            rc = GPG_ERR_CONFLICT;
+
           err = keydb_get_keyblock (hd, &kb);
           if (err)
             log_error (_("error reading key block for '%s': %s.\n"),
@@ -2225,6 +2228,15 @@ check_user_ids (strlist_t *sp,
               release_kbnode (kb);
             }
         }
+      else if (! (gpg_err_code (err) == GPG_ERR_NOT_FOUND
+                  || gpg_err_code (err) == GPG_ERR_EOF))
+        /* An error (other than "not found").  */
+        {
+          log_error (_("Error reading from keyring: %s\n"),
+                     gpg_strerror (err));
+          if (! rc)
+            rc = err;
+        }
     }
 
   strlist_rev (&s2);

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

Summary of changes:
 g10/gpg.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)


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




More information about the Gnupg-commits mailing list