summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/common')
-rw-r--r--source4/lib/ldb/common/ldb_modules.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c
index d09579510e..558a6f4d83 100644
--- a/source4/lib/ldb/common/ldb_modules.c
+++ b/source4/lib/ldb/common/ldb_modules.c
@@ -338,9 +338,13 @@ int ldb_load_modules(struct ldb_context *ldb, const char *options[])
when ldb is extended
*/
#define FIND_OP(module, op) do { \
+ struct ldb_context *ldb = module->ldb; \
module = module->next; \
while (module && module->ops->op == NULL) module = module->next; \
- if (module == NULL) return LDB_ERR_OPERATIONS_ERROR; \
+ if (module == NULL) { \
+ ldb_set_errstring(ldb, talloc_strdup(ldb, "Unable to find backend operation for " #op )); \
+ return LDB_ERR_OPERATIONS_ERROR; \
+ } \
} while (0)