c325f9c user: handle LDAP auto-bind for whoami case

1 file Authored by abbra 8 months ago, Committed by antorres 8 months ago,
    user: handle LDAP auto-bind for whoami case
    
    In LDAP auto-bind situation we will not have a Kerberos principal
    available, so we should be using a different mechanism to find the
    object. Since we already have a valid bound LDAP DN, use it as a base DN
    here and simply require presence of the POSIX account.
    
    This will not match 'cn=Directory Manager' but none of the code we have
    uses LDAP auto-bind as root when calling 'ipa user-find --whoami'.
    
    Fixes: https://pagure.io/freeipa/issue/9583
    
    Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
    Reviewed-By: Thomas Woerner <twoerner@redhat.com>
    Reviewed-By: Rob Crittenden <rcritten@redhat.com>
    Reviewed-By: Rafael Guterres Jeffman <rjeffman@redhat.com>
    
        
file modified
+6 -1