ldb: error out when modules are not found
authorSimo Sorce <idra@samba.org>
Thu, 18 Nov 2010 13:01:15 +0000 (08:01 -0500)
committerSimo Sorce <idra@samba.org>
Thu, 18 Nov 2010 14:02:34 +0000 (14:02 +0000)
We shouldn't proceed without all required modules, it could cause damage to the
ldb if operations are performed w/o the needed modules.

Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Thu Nov 18 14:02:34 UTC 2010 on sn-devel-104

source4/lib/ldb/common/ldb_modules.c

index 123d2186677b6711d280580f01719ec75f40c84e..e3301371405ea91394d30f5153d8d66a6bbcaa2a 100644 (file)
@@ -312,7 +312,7 @@ int ldb_module_load_list(struct ldb_context *ldb, const char **module_list,
                if (ops == NULL) {
                        ldb_debug(ldb, LDB_DEBUG_FATAL, "WARNING: Module [%s] not found - do you need to set LDB_MODULES_PATH?",
                                  module_list[i]);
-                       continue;
+                       return LDB_ERR_OPERATIONS_ERROR;
                }
 
                current = talloc_zero(ldb, struct ldb_module);