[PATCH] ldb: error out when modules are not found

Simo Sorce idra at samba.org
Thu Nov 18 06:01:15 MST 2010


We shouldn't proceed without all required modules, it could cause damage to the
ldb if operations are performed w/o the needed modules.
---
 source4/lib/ldb/common/ldb_modules.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c
index 123d218..e330137 100644
--- a/source4/lib/ldb/common/ldb_modules.c
+++ b/source4/lib/ldb/common/ldb_modules.c
@@ -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);
-- 
1.7.2.3


--=-DrWqIg2ZtHiwoVACAYSE--



More information about the samba-technical mailing list