89a706a AD: Always get domain-specific ID connection

2 files Authored by sgallagh 9 years ago, Committed by jhrozek 9 years ago,
    AD: Always get domain-specific ID connection
    
    ad_get_dom_ldap_conn() assumed that ad_ctx->ldap_ctx always points at
    the LDAP connection for the primary domain, however it turns out that
    this is not always the case. It's currently unclear why, but this
    connection can sometimes be pointing at a subdomain. Since the value of
    subdom_id_ctx->ldap_ctx always points to the correct domain (including
    the primary domain case), there's no benefit to trying to shortcut to
    the ad_ctx->ldap_ctx when performing this lookup.
    
    This patch also makes a minor tweak to the tests so that the primary
    domain passes the sdap_domain_get() check for validity (since it needs
    to have a private member assigned).
    
    Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
    (cherry picked from commit e2bd4f8a41b72aea0712ad21ad02ccebb707f536)
    
        
file modified
+7 -11