summaryrefslogtreecommitdiff
path: root/source4/libcli/resolve
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/resolve')
-rw-r--r--source4/libcli/resolve/dns_ex.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/libcli/resolve/dns_ex.c b/source4/libcli/resolve/dns_ex.c
index 76dd103154..711eb0abf1 100644
--- a/source4/libcli/resolve/dns_ex.c
+++ b/source4/libcli/resolve/dns_ex.c
@@ -92,6 +92,14 @@ static void run_child_dns_lookup(struct dns_ex_state *state, int fd)
uint32_t i;
bool do_srv = (state->flags & RESOLVE_NAME_FLAG_DNS_SRV);
+ if (strchr(state->name.name, '.') && state->name.name[strlen(state->name.name)-1] != '.') {
+ /* we are asking for a fully qualified name, but the
+ name doesn't end in a '.'. We need to prevent the
+ DNS library trying the search domains configured in
+ resolv.conf */
+ state->name.name = talloc_strdup_append(state->name.name, ".");
+ }
+
/* this is the blocking call we are going to lots of trouble
to avoid in the parent */
reply = rk_dns_lookup(state->name.name, do_srv?"SRV":"A");