1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

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.
This commit is contained in:
Florian Weimer
2019-04-11 11:37:47 +02:00
parent 32d85c116d
commit e3f454bac0
3 changed files with 6 additions and 6 deletions

View File

@ -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;