diff options
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/ldb/common/ldb.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c index ff5d2a2e8b..857c995a0e 100644 --- a/source4/lib/ldb/common/ldb.c +++ b/source4/lib/ldb/common/ldb.c @@ -189,9 +189,13 @@ void ldb_reset_err_string(struct ldb_context *ldb) } #define FIRST_OP(ldb, op) do { \ - module = ldb->modules; \ + module = ldb->modules; \ 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_asprintf(ldb, "unable to find module or backend to handle operation: " #op)); \ + return LDB_ERR_OPERATIONS_ERROR; \ + } \ } while (0) /* |