apply_search(
name,search_list,ndots) ->candidates
Expand a name with search list and ndots logic
If name is FQDN (trailing dot), returns it as-is (single candidate). Otherwise, counts dots in the name:
The as-is form always gets a trailing dot appended.