af820c9 mock domain: reset ldb errors

2 files Authored by pbrezina 5 years ago, Committed by jhrozek 5 years ago,
    mock domain: reset ldb errors
    
    After ldb connect ldb context contains the following error:
    "NULL Base DN invalid for a base search"
    
    This comes from internal ldb function ldb_set_default_dns() which
    runs base search on NULL dn to discover records similar to what
    rootDSE provides. However, tdb backend considers this an error
    and sets the message above.
    
    This may break memory leak checks in tests when we do push/pop on
    test_ctx which is a indirect parent of ldb_context. The error message
    is allocated when push is called but it is freed by other ldb queries
    and therefore not preset during the push phase and thus the leak check
    fails.
    
    Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
    
        
file modified
+3 -1
file modified
+4 -0