From af820c9fc6aa1768e2e6b0df78fb489dbb1b28d0 Mon Sep 17 00:00:00 2001 From: Pavel Březina Date: Thu, 18 Feb 2016 14:25:18 +0100 Subject: 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 --- Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 9e6438e9b..f5d0400cd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1429,7 +1429,9 @@ libsss_test_common_la_SOURCES = \ src/tests/common.c libsss_test_common_la_LIBADD = \ $(TALLOC_LIBS) \ - $(TEVENT_LIBS) + $(TEVENT_LIBS) \ + $(LDB_LIBS) \ + $(NULL) if HAVE_CHECK libsss_test_common_la_SOURCES += \ -- cgit