From 87df785a68c1c8043b345b71c98764ef36b76179 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 6 Jul 2010 13:21:54 +1000 Subject: 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. --- source4/dsdb/samdb/ldb_modules/naming_fsmo.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'source4/dsdb/samdb/ldb_modules/naming_fsmo.c') diff --git a/source4/dsdb/samdb/ldb_modules/naming_fsmo.c b/source4/dsdb/samdb/ldb_modules/naming_fsmo.c index 3a10a604ec..5023657d86 100644 --- a/source4/dsdb/samdb/ldb_modules/naming_fsmo.c +++ b/source4/dsdb/samdb/ldb_modules/naming_fsmo.c @@ -47,8 +47,7 @@ static int naming_fsmo_init(struct ldb_module *module) mem_ctx = talloc_new(module); if (!mem_ctx) { - ldb_oom(ldb); - return LDB_ERR_OPERATIONS_ERROR; + return ldb_oom(ldb); } naming_dn = samdb_partitions_dn(ldb, mem_ctx); @@ -61,8 +60,7 @@ static int naming_fsmo_init(struct ldb_module *module) naming_fsmo = talloc_zero(mem_ctx, struct dsdb_naming_fsmo); if (!naming_fsmo) { - ldb_oom(ldb); - return LDB_ERR_OPERATIONS_ERROR; + return ldb_oom(ldb); } ldb_module_set_private(module, naming_fsmo); @@ -84,8 +82,7 @@ static int naming_fsmo_init(struct ldb_module *module) } if (ldb_set_opaque(ldb, "dsdb_naming_fsmo", naming_fsmo) != LDB_SUCCESS) { - ldb_oom(ldb); - return LDB_ERR_OPERATIONS_ERROR; + return ldb_oom(ldb); } talloc_steal(module, naming_fsmo); -- cgit