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/extended_dn_store.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/extended_dn_store.c')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/extended_dn_store.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn_store.c b/source4/dsdb/samdb/ldb_modules/extended_dn_store.c index 731e4c368b..07d106e222 100644 --- a/source4/dsdb/samdb/ldb_modules/extended_dn_store.c +++ b/source4/dsdb/samdb/ldb_modules/extended_dn_store.c @@ -233,7 +233,7 @@ static int extended_store_replace(struct extended_dn_context *ac, os = talloc_zero(ac, struct extended_dn_replace_list); if (!os) { - return LDB_ERR_OPERATIONS_ERROR; + return ldb_oom(ac->ldb); } os->ac = ac; @@ -307,7 +307,7 @@ static int extended_dn_add(struct ldb_module *module, struct ldb_request *req) ac = extended_dn_context_init(module, req); if (!ac) { - return LDB_ERR_OPERATIONS_ERROR; + return ldb_operr(ldb_module_get_ctx(module)); } if (!ac->schema) { @@ -333,8 +333,7 @@ static int extended_dn_add(struct ldb_module *module, struct ldb_request *req) if (!ac->new_req) { struct ldb_message *msg = ldb_msg_copy(ac, req->op.add.message); if (!msg) { - ldb_oom(ldb_module_get_ctx(module)); - return LDB_ERR_OPERATIONS_ERROR; + return ldb_oom(ldb_module_get_ctx(module)); } ret = ldb_build_add_req(&ac->new_req, ac->ldb, ac, msg, req->controls, ac, extended_final_callback, req); @@ -382,7 +381,7 @@ static int extended_dn_modify(struct ldb_module *module, struct ldb_request *req ac = extended_dn_context_init(module, req); if (!ac) { - return LDB_ERR_OPERATIONS_ERROR; + return ldb_operr(ldb_module_get_ctx(module)); } if (!ac->schema) { @@ -409,8 +408,7 @@ static int extended_dn_modify(struct ldb_module *module, struct ldb_request *req struct ldb_message *msg = ldb_msg_copy(ac, req->op.mod.message); if (!msg) { talloc_free(ac); - ldb_oom(ac->ldb); - return LDB_ERR_OPERATIONS_ERROR; + return ldb_oom(ac->ldb); } ret = ldb_build_mod_req(&ac->new_req, ac->ldb, ac, msg, req->controls, ac, extended_final_callback, req); |