diff options
author | Rich Felker <dalias@aerifal.cx> | 2018-06-26 16:17:05 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2018-06-26 16:38:26 -0400 |
commit | 63e2e40ee3aa3bdd160a7eeace98f3dfb89ddbe2 (patch) | |
tree | 6a017e9179342ee30ad87a4955192cb478dc80e4 /src/time/strftime.c | |
parent | efda534b212f713fe2b92a62b06e45f656b763ce (diff) | |
download | musl-63e2e40ee3aa3bdd160a7eeace98f3dfb89ddbe2.tar.gz |
resolver: omit final dot (root/suppress-search) in canonical name
if a final dot was included in the queried host name to anchor it to
the dns root/suppress search domains, and the result was not a CNAME,
the returned canonical name included the final dot. this was not
consistent with other implementations, confused some applications, and
does not seem desirable.
POSIX specifies returning a pointer to, or to a copy of, the input
nodename, when the canonical name is not available, but does not
attempt to specify what constitutes "not available". in the case of
search, we already have an implementation-defined "availability" of a
canonical name as the fully-qualified name resulting from search, so
defining it similarly in the no-search case seems reasonable in
addition to being consistent with other implementations.
as a bonus, fix the case where more than one trailing dot is included,
since otherwise the changes made here would wrongly cause lookups with
two trailing dots to succeed. previously this case resulted in
malformed dns queries and produced EAI_AGAIN after a timeout. now it
fails immediately with EAI_NONAME.
Diffstat (limited to 'src/time/strftime.c')
0 files changed, 0 insertions, 0 deletions