[git] GnuPG - branch, master, updated. gnupg-2.1.17-19-gb200e63

by Werner Koch cvs at cvs.gnupg.org
Mon Jan 2 10:05:49 CET 2017


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  b200e636ab20d2aa93d9f71f3789db5a04af0a56 (commit)
      from  337690441fcb19343fe56b139f5649bed7d25c83 (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 b200e636ab20d2aa93d9f71f3789db5a04af0a56
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Jan 2 10:00:33 2017 +0100

    dirmngr: Strip root zone suffix from libdns cname results.
    
    * dirmngr/dns-stuff.c (resolve_name_libdns): Strip trailing dot.
    (get_dns_cname_libdns): Ditto.
    --
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/dirmngr/dns-stuff.c b/dirmngr/dns-stuff.c
index a31b073..f2e1df9 100644
--- a/dirmngr/dns-stuff.c
+++ b/dirmngr/dns-stuff.c
@@ -732,6 +732,10 @@ resolve_name_libdns (const char *name, unsigned short port,
               err = gpg_error_from_syserror ();
               goto leave;
             }
+          /* Libdns appends the root zone part which is problematic
+           * for most other functions - strip it.  */
+          if (**r_canonname && (*r_canonname)[strlen (*r_canonname)-1] == '.')
+            (*r_canonname)[strlen (*r_canonname)-1] = 0;
         }
 
       dai = xtrymalloc (sizeof *dai + ent->ai_addrlen -1);
@@ -1899,6 +1903,13 @@ get_dns_cname_libdns (const char *name, char **r_cname)
   *r_cname = xtrystrdup (cname.host);
   if (!*r_cname)
     err = gpg_error_from_syserror ();
+  else
+    {
+      /* Libdns appends the root zone part which is problematic
+       * for most other functions - strip it.  */
+      if (**r_cname && (*r_cname)[strlen (*r_cname)-1] == '.')
+        (*r_cname)[strlen (*r_cname)-1] = 0;
+    }
 
  leave:
   dns_free (ans);

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

Summary of changes:
 dirmngr/dns-stuff.c | 11 +++++++++++
 1 file changed, 11 insertions(+)


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




More information about the Gnupg-commits mailing list