[Pkg-gnupg-commit] [gnupg2] 44/116: dirmngr: Strip root zone suffix from libdns SRV results.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Tue Jan 24 04:40:52 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gnupg2.
commit 9fa94aa10778bbd680315e93b23175423e338c40
Author: Werner Koch <wk at gnupg.org>
Date: Sun Jan 8 18:00:38 2017 +0100
dirmngr: Strip root zone suffix from libdns SRV results.
* dirmngr/dns-stuff.c (getsrv_libdns): Strip trailing dot from the
target.
--
See-also: b200e636ab20d2aa93d9f71f3789db5a04af0a56
Signed-off-by: Werner Koch <wk at gnupg.org>
---
dirmngr/dns-stuff.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/dirmngr/dns-stuff.c b/dirmngr/dns-stuff.c
index e32e1e3..028b065 100644
--- a/dirmngr/dns-stuff.c
+++ b/dirmngr/dns-stuff.c
@@ -1591,6 +1591,10 @@ getsrv_libdns (const char *name, struct srventry **list, unsigned int *r_count)
srv->weight = dsrv.weight;
srv->port = dsrv.port;
mem2str (srv->target, dsrv.target, sizeof srv->target);
+ /* Libdns appends the root zone part which is problematic for
+ * most other functions - strip it. */
+ if (*srv->target && (srv->target)[strlen (srv->target)-1] == '.')
+ (srv->target)[strlen (srv->target)-1] = 0;
}
*r_count = srvcount;
--
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