From 7bd5d402081bd7cd4cfeb2641bf011ad68be6443 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 8 Nov 2010 15:46:09 +1100 Subject: s4-ldb: don't give an error if a module is already registered this can happen when both the build and install paths are used to load ldb modules Autobuild-User: Andrew Tridgell Autobuild-Date: Mon Nov 8 05:28:14 UTC 2010 on sn-devel-104 --- source4/lib/ldb/common/ldb_modules.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source4/lib/ldb/common') diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c index ab06dc5788..123d218667 100644 --- a/source4/lib/ldb/common/ldb_modules.c +++ b/source4/lib/ldb/common/ldb_modules.c @@ -905,6 +905,13 @@ static int ldb_modules_load_path(const char *path, const char *version) } ret = init_fn(version); + if (ret == LDB_ERR_ENTRY_ALREADY_EXISTS) { + /* the module is already registered - ignore this, as + * it can happen if LDB_MODULES_PATH points at both + * the build and install directory + */ + ret = LDB_SUCCESS; + } return ret; } -- cgit