r16908: Set an error string if we can't find a backend for an operation.
authorAndrew Bartlett <abartlet@samba.org>
Mon, 10 Jul 2006 08:31:47 +0000 (08:31 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:09:58 +0000 (14:09 -0500)
Andrew Bartlett
(This used to be commit 6a8c9af9bae8c482dfdb07114ae8313b7e35d9e9)

source4/lib/ldb/common/ldb_modules.c

index d09579510e9fc1db737f2cb98a1cb0829caa5dea..558a6f4d8300326aea878c69e8452a3710b50a98 100644 (file)
@@ -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)