dfe05f5 AD: Make ad_account_can_shortcut() reusable by SSSD on an IPA server

Authored and Committed by jhrozek 6 years ago
    AD: Make ad_account_can_shortcut() reusable by SSSD on an IPA server
    
    Resolves:
        https://pagure.io/SSSD/sssd/issue/3318
    
    The ad_account_can_shortcut() function is helpful to avoid unnecessary
    searches when SSSD is configured with an Active Directory domain that
    uses ID-mapping in the sense that if we find that an ID is outside our
    range, we can just abort the search in this domain and carry on.
    
    This function was only used in the AD provider functions which are used
    when SSSD is enrolled direcly with an AD server. This patch moves the
    function to a codepath that is shared between directly enrolled SSSD and
    SSSD running on an IPA server.
    
    Apart from moving the code, there are some minor changes to the function
    signature, namely the domain is passed as as struct (previously the
    domain name from the DP input was passed).
    
    Reviewed-by: Michal Židek <mzidek@redhat.com>
    
        
file modified
+84 -78