[Pkg-gnupg-commit] [gnupg2] 01/02: cherrypick patches from upstream

Daniel Kahn Gillmor dkg at fifthhorseman.net
Sat Dec 24 23:25:19 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gnupg2.

commit cda4c517c75b97362b8f7a9c8301d4a1b0ace207
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Sat Dec 24 18:10:43 2016 -0500

    cherrypick patches from upstream
---
 .../0012-gpgscm-Guard-use-of-union-member.patch    | 27 ++++++++
 ...0013-dirmngr-Fix-for-disable-libdns-usage.patch | 74 ++++++++++++++++++++++
 debian/patches/series                              |  2 +
 3 files changed, 103 insertions(+)

diff --git a/debian/patches/0012-gpgscm-Guard-use-of-union-member.patch b/debian/patches/0012-gpgscm-Guard-use-of-union-member.patch
new file mode 100644
index 0000000..f44bfe6
--- /dev/null
+++ b/debian/patches/0012-gpgscm-Guard-use-of-union-member.patch
@@ -0,0 +1,27 @@
+From: Justus Winter <justus at g10code.com>
+Date: Wed, 21 Dec 2016 16:14:45 +0100
+Subject: gpgscm: Guard use of union member.
+
+* tests/gpgscm/scheme.c (opexe_5): Check that we have a file port
+before accessing filename.  Fixes a crash on 32-bit architectures.
+
+Fixes-commit: e7429b1ced0c69fa7901f888f8dc25f00fc346a4
+Signed-off-by: Justus Winter <justus at g10code.com>
+(cherry picked from commit 6e96cdd41a0e55b672309431062f37c4a4a9f485)
+---
+ tests/gpgscm/scheme.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c
+index a5b7691fb..284454557 100644
+--- a/tests/gpgscm/scheme.c
++++ b/tests/gpgscm/scheme.c
+@@ -4838,7 +4838,7 @@ static pointer opexe_5(scheme *sc, enum scheme_opcodes op) {
+                } else {
+                     sc->nesting_stack[sc->file_i]++;
+ #if USE_TAGS && SHOW_ERROR_LINE
+-		    {
++		    if (sc->load_stack[sc->file_i].kind & port_file) {
+ 		      const char *filename =
+ 			sc->load_stack[sc->file_i].rep.stdio.filename;
+ 		      int lineno =
diff --git a/debian/patches/0013-dirmngr-Fix-for-disable-libdns-usage.patch b/debian/patches/0013-dirmngr-Fix-for-disable-libdns-usage.patch
new file mode 100644
index 0000000..b429d8e
--- /dev/null
+++ b/debian/patches/0013-dirmngr-Fix-for-disable-libdns-usage.patch
@@ -0,0 +1,74 @@
+From: NIIBE Yutaka <gniibe at fsij.org>
+Date: Fri, 23 Dec 2016 16:05:01 +0900
+Subject: dirmngr: Fix for --disable-libdns usage.
+
+* dirmngr/dns-stuff.c (enable_recursive_resolver, set_dns_nameserver)
+(reload_dns_stuff): Conditionalize with USE_LIBDNS.
+(get_h_errno_as_gpg_error): Map HOST_NOT_FOUND to GPG_ERR_NO_NAME.
+
+--
+
+get_dns_srv assumes error code of GPG_ERR_NO_NAME when no SRV record
+available.
+
+Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
+GnuPG-bug-id: 2889
+(cherry picked from commit d26c51825e2255fe58305cbc1cd74fa43f80d93e)
+---
+ dirmngr/dns-stuff.c | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/dirmngr/dns-stuff.c b/dirmngr/dns-stuff.c
+index 491fccefd..a31b0731c 100644
+--- a/dirmngr/dns-stuff.c
++++ b/dirmngr/dns-stuff.c
+@@ -181,7 +181,9 @@ void
+ enable_recursive_resolver (int yes)
+ {
+   recursive_resolver = yes;
++#ifdef USE_LIBDNS
+   libdns_reinit_pending = 1;
++#endif
+ }
+ 
+ 
+@@ -251,8 +253,10 @@ set_dns_nameserver (const char *ipaddr)
+   strncpy (tor_nameserver, ipaddr? ipaddr : DEFAULT_NAMESERVER,
+            sizeof tor_nameserver -1);
+   tor_nameserver[sizeof tor_nameserver -1] = 0;
++#ifdef USE_LIBDNS
+   libdns_reinit_pending = 1;
+   libdns_tor_port = 0;  /* Start again with the default port.  */
++#endif
+ }
+ 
+ 
+@@ -278,7 +282,7 @@ get_h_errno_as_gpg_error (void)
+ 
+   switch (h_errno)
+     {
+-    case HOST_NOT_FOUND: ec = GPG_ERR_UNKNOWN_HOST; break;
++    case HOST_NOT_FOUND: ec = GPG_ERR_NO_NAME; break;
+     case TRY_AGAIN:      ec = GPG_ERR_TRY_LATER; break;
+     case NO_RECOVERY:    ec = GPG_ERR_SERVER_FAILED; break;
+     case NO_DATA:        ec = GPG_ERR_NO_DATA; break;
+@@ -534,15 +538,17 @@ libdns_deinit (void)
+ void
+ reload_dns_stuff (int force)
+ {
++#ifdef USE_LIBDNS
+   if (force)
+     {
+-#ifdef USE_LIBDNS
+       libdns_deinit ();
+-#endif
+       libdns_reinit_pending = 0;
+     }
+   else
+     libdns_reinit_pending = 1;
++#else
++  (void)force;
++#endif
+ }
+ 
+ 
diff --git a/debian/patches/series b/debian/patches/series
index a43241d..7d8bc13 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,5 @@ gpg-agent-idling/0001-agent-Create-framework-of-scheduled-timers.patch
 gpg-agent-idling/0002-agent-Allow-threads-to-interrupt-main-select-loop-wi.patch
 gpg-agent-idling/0003-agent-Avoid-tight-timer-tick-when-possible.patch
 gpg-agent-idling/0004-agent-Avoid-scheduled-checks-on-socket-when-inotify-.patch
+0012-gpgscm-Guard-use-of-union-member.patch
+0013-dirmngr-Fix-for-disable-libdns-usage.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list