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");