From 977e44c556c76ee6df9359124807e003e4dc3257 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 10 Jul 2006 08:31:47 +0000 Subject: r16908: Set an error string if we can't find a backend for an operation. Andrew Bartlett (This used to be commit 6a8c9af9bae8c482dfdb07114ae8313b7e35d9e9) --- source4/lib/ldb/common/ldb_modules.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source4/lib') 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) -- cgit