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/new_partition.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/new_partition.c')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/new_partition.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/new_partition.c b/source4/dsdb/samdb/ldb_modules/new_partition.c index a6102d6a6f..33da2a445b 100644 --- a/source4/dsdb/samdb/ldb_modules/new_partition.c +++ b/source4/dsdb/samdb/ldb_modules/new_partition.c @@ -114,8 +114,7 @@ static int np_part_search_callback(struct ldb_request *req, struct ldb_reply *ar /* Now that we know it does not exist, we can try and create the partition */ ex_op = talloc(ac, struct dsdb_create_partition_exop); if (ex_op == NULL) { - ldb_oom(ldb); - return LDB_ERR_OPERATIONS_ERROR; + return ldb_oom(ldb); } ex_op->new_dn = ac->req->op.add.message->dn; @@ -174,7 +173,7 @@ static int new_partition_add(struct ldb_module *module, struct ldb_request *req) * record already exists */ ac = talloc(req, struct np_context); if (ac == NULL) { - return LDB_ERR_OPERATIONS_ERROR; + return ldb_oom(ldb); } ac->module = module; ac->req = req; |