This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.29.9000-196-ge3f454b
- From: fw at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 11 Apr 2019 09:57:16 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.29.9000-196-ge3f454b
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 "GNU C Library master sources".
The branch, master has been updated
via e3f454bac0f968216699ca405c127c858f0657c7 (commit)
from 32d85c116dd07b25f58b24204e7b05489f06fed4 (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 -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e3f454bac0f968216699ca405c127c858f0657c7
commit e3f454bac0f968216699ca405c127c858f0657c7
Author: Florian Weimer <fweimer@redhat.com>
Date: Thu Apr 11 11:37:47 2019 +0200
nss_dns: Do not replace root domain with empty string
The purpose of the bp[0] == '.' check is unclear. Only the root domain
starts with '.'. The empty string is accepted as a domain name in many
places, denoting the root, but using it implicitly is confusing.
diff --git a/ChangeLog b/ChangeLog
index 1d0ba71..1cb1255 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2019-04-11 Florian Weimer <fweimer@redhat.com>
+ * resolv/nss_dns/dns-network.c (getanswer_r): Do not replace root
+ domain with empty string.
+ * resolv/nss_dns/dns-host.c (getanswer_r): Likewise.
+
+2019-04-11 Florian Weimer <fweimer@redhat.com>
+
* include/alloc_buffer.h (alloc_buffer_alloc_bytes): Update
comment.
(alloc_buffer_next): Change return type to non-const. Update
diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
index a18b8a6..9c15f25 100644
--- a/resolv/nss_dns/dns-host.c
+++ b/resolv/nss_dns/dns-host.c
@@ -706,9 +706,6 @@ getanswer_r (struct resolv_context *ctx,
n = -1;
}
- if (n > 0 && bp[0] == '.')
- bp[0] = '\0';
-
if (__glibc_unlikely (n < 0))
{
*errnop = errno;
diff --git a/resolv/nss_dns/dns-network.c b/resolv/nss_dns/dns-network.c
index 4b81b1b..21688c1 100644
--- a/resolv/nss_dns/dns-network.c
+++ b/resolv/nss_dns/dns-network.c
@@ -345,9 +345,6 @@ getanswer_r (const querybuf *answer, int anslen, struct netent *result,
n = -1;
}
- if (n > 0 && bp[0] == '.')
- bp[0] = '\0';
-
if (n < 0 || res_dnok (bp) == 0)
break;
cp += n;
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
resolv/nss_dns/dns-host.c | 3 ---
resolv/nss_dns/dns-network.c | 3 ---
3 files changed, 6 insertions(+), 6 deletions(-)
hooks/post-receive
--
GNU C Library master sources