cd4590d sysdb custom: completely replace old object instead of merging it

1 file Authored by pbrezina 6 years ago, Committed by jhrozek 6 years ago,
    sysdb custom: completely replace old object instead of merging it
    
    This patch is written primary for sudo use case, but it makes sure the we do
    not merge two record in other parts of the code that uses sysdb_store_custom.
    
    1) If there are two rules with the same cn (possible with multiple search bases
    or organizational units) we would end up merging those two rules instead of
    choosing one of them.
    
    2) Also smart refresh would merge the diff insteand of removing the attributes
    that are no longer present in ldap.
    
    Since 1) is a rare use case and it is a misconfiguration we completely replace
    the old rule with new one. It is simpler to implement and it solves both issues.
    
    Resolves:
    https://pagure.io/SSSD/sssd/issue/3558
    
    Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
    Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
    
        
file modified
+5 -28