summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-07-10 08:31:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:09:58 -0500
commit977e44c556c76ee6df9359124807e003e4dc3257 (patch)
tree93adaedfd75b340f181aa5d4191e6bc5754327ac /source4/lib/ldb/common
parentb7c5bc522b286e8e478b6f74a68bc68829e64c3c (diff)
downloadsamba-977e44c556c76ee6df9359124807e003e4dc3257.tar.gz
samba-977e44c556c76ee6df9359124807e003e4dc3257.tar.bz2
samba-977e44c556c76ee6df9359124807e003e4dc3257.zip
r16908: Set an error string if we can't find a backend for an operation.
Andrew Bartlett (This used to be commit 6a8c9af9bae8c482dfdb07114ae8313b7e35d9e9)
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)