diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-07-06 13:21:54 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-07-07 20:14:55 +1000 |
commit | 87df785a68c1c8043b345b71c98764ef36b76179 (patch) | |
tree | a4d3071a393661c93e97f9963e492d494241173c /source4/dsdb/samdb/ldb_modules/show_deleted.c | |
parent | fc68558ab937859a91214e8675d53c0afaf3c4e6 (diff) | |
download | samba-87df785a68c1c8043b345b71c98764ef36b76179.tar.gz samba-87df785a68c1c8043b345b71c98764ef36b76179.tar.bz2 samba-87df785a68c1c8043b345b71c98764ef36b76179.zip |
s4-dsdb: use ldb_operr() in the dsdb code
this replaces "return LDB_ERR_OPERATIONS_ERROR" with "return ldb_operr(ldb)"
in places in the dsdb code where we don't already explicitly set an
error string. This should make is much easier to track down dsdb
module bugs that result in an operations error.
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/show_deleted.c')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/show_deleted.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/show_deleted.c b/source4/dsdb/samdb/ldb_modules/show_deleted.c index 93463ae95f..c189115599 100644 --- a/source4/dsdb/samdb/ldb_modules/show_deleted.c +++ b/source4/dsdb/samdb/ldb_modules/show_deleted.c @@ -53,23 +53,20 @@ static int show_deleted_search(struct ldb_module *module, struct ldb_request *re in-situ */ new_tree = talloc(req, struct ldb_parse_tree); if (!new_tree) { - ldb_oom(ldb); - return LDB_ERR_OPERATIONS_ERROR; + return ldb_oom(ldb); } new_tree->operation = LDB_OP_AND; new_tree->u.list.num_elements = 2; new_tree->u.list.elements = talloc_array(new_tree, struct ldb_parse_tree *, 2); if (!new_tree->u.list.elements) { - ldb_oom(ldb); - return LDB_ERR_OPERATIONS_ERROR; + return ldb_oom(ldb); } new_tree->u.list.elements[0] = talloc(new_tree->u.list.elements, struct ldb_parse_tree); new_tree->u.list.elements[0]->operation = LDB_OP_NOT; new_tree->u.list.elements[0]->u.isnot.child = talloc(new_tree->u.list.elements, struct ldb_parse_tree); if (!new_tree->u.list.elements[0]->u.isnot.child) { - ldb_oom(ldb); - return LDB_ERR_OPERATIONS_ERROR; + return ldb_oom(ldb); } new_tree->u.list.elements[0]->u.isnot.child->operation = LDB_OP_EQUALITY; new_tree->u.list.elements[0]->u.isnot.child->u.equality.attr = "isDeleted"; @@ -109,7 +106,7 @@ static int show_deleted_init(struct ldb_module *module) if (ret != LDB_SUCCESS) { ldb_debug(ldb, LDB_DEBUG_ERROR, "show_deleted: Unable to register control with rootdse!\n"); - return LDB_ERR_OPERATIONS_ERROR; + return ldb_operr(ldb); } return ldb_next_init(module); |