0e093f9 Accept server host names resolvable only using /etc/hosts

1 file Authored by pspacek 7 years ago, Committed by mbabinsk 7 years ago,
    Accept server host names resolvable only using /etc/hosts
    
    Apparently "files" implementation of hosts NSS database cannot deal with
    trailing period in host names.
    
    Previously name server.example.com which is was resolvable neither using
    dns nor myhostname NSS modules were rejected by installer
    (despite having matching line in /etc/hosts).
    
    These names which are resolvable purely using "files" database are now
    accepted.
    
    The problem is that I had to remove trailing period from names passed
    to getaddrinfo() function. This effectivelly enables search list processing.
    This means that items from the search list might be silently appended to
    the query and we might get an IP address for totally different names
    than we asked for.
    
    Unfortunatelly I see no way around this while keeping ability
    to use names from NSS hosts database.
    
    https://fedorahosted.org/freeipa/ticket/6518
    
    Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>