summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/subtree_rename.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-07-06 13:21:54 +1000
committerAndrew Tridgell <tridge@samba.org>2010-07-07 20:14:55 +1000
commit87df785a68c1c8043b345b71c98764ef36b76179 (patch)
treea4d3071a393661c93e97f9963e492d494241173c /source4/dsdb/samdb/ldb_modules/subtree_rename.c
parentfc68558ab937859a91214e8675d53c0afaf3c4e6 (diff)
downloadsamba-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/subtree_rename.c')
-rw-r--r--source4/dsdb/samdb/ldb_modules/subtree_rename.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/subtree_rename.c b/source4/dsdb/samdb/ldb_modules/subtree_rename.c
index ed2b024754..6d79db1fb0 100644
--- a/source4/dsdb/samdb/ldb_modules/subtree_rename.c
+++ b/source4/dsdb/samdb/ldb_modules/subtree_rename.c
@@ -122,7 +122,7 @@ static int subtree_rename_next_request(struct subtree_rename_context *ac)
ldb = ldb_module_get_ctx(ac->module);
if (ac->current == NULL) {
- return LDB_ERR_OPERATIONS_ERROR;
+ return ldb_operr(ldb);
}
ret = ldb_build_rename_req(&req, ldb, ac->current,
@@ -241,13 +241,13 @@ static int subtree_rename(struct ldb_module *module, struct ldb_request *req)
ac = subren_ctx_init(module, req);
if (!ac) {
- return LDB_ERR_OPERATIONS_ERROR;
+ return ldb_operr(ldb);
}
/* add this entry as the first to do */
ac->current = talloc_zero(ac, struct subren_msg_store);
if (ac->current == NULL) {
- return LDB_ERR_OPERATIONS_ERROR;
+ return ldb_oom(ldb);
}
ac->current->olddn = req->op.rename.olddn;
ac->current->newdn = req->op.rename.newdn;