00cc9f8 SYSDB: Fix sysdb_search_by_name() for looking up groups in MPG domains

2 files Authored by jhrozek 6 years ago, Committed by lslebodn 6 years ago,
    SYSDB: Fix sysdb_search_by_name() for looking up groups in MPG domains
    
    If a group was being looked by using sysdb_search_by_name() in a MPG
    domain, the code would search only for group objects -- but in a MPG
    domain, there may be none, the groups are typically inferred from a user
    object.
    
    This could have caused issues e.g. for IPA code with the following
    sequence:
        getent group aduser@windows.domain
        getent passwd aduser@windows.domain
    
    The former would fail to add the fallback subdomain homedir and the latter
    would then return a user entry without a homedir, with libc falling back
    to the "/" homedir.
    
    Resolves:
    https://pagure.io/SSSD/sssd/issue/3615
    
    Reviewed-by: Pavel Březina <pbrezina@redhat.com>
    (cherry picked from commit 6df34be3ee736d7a34e67c49c365077be849031a)
    
        
file modified
+19 -12
file modified
+36 -0