summaryrefslogtreecommitdiff
path: root/source4/dsdb/schema/schema_init.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/schema/schema_init.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/schema/schema_init.c')
-rw-r--r--source4/dsdb/schema/schema_init.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c
index bb22df18bb..7bcdf858dd 100644
--- a/source4/dsdb/schema/schema_init.c
+++ b/source4/dsdb/schema/schema_init.c
@@ -426,13 +426,12 @@ static int dsdb_schema_setup_ldb_schema_attribute(struct ldb_context *ldb,
}
if (s == NULL) {
- return LDB_ERR_OPERATIONS_ERROR;
+ return ldb_operr(ldb);
}
attr->ldb_schema_attribute = a = talloc(attr, struct ldb_schema_attribute);
if (attr->ldb_schema_attribute == NULL) {
- ldb_oom(ldb);
- return LDB_ERR_OPERATIONS_ERROR;
+ return ldb_oom(ldb);
}
a->name = attr->lDAPDisplayName;
@@ -731,7 +730,7 @@ int dsdb_schema_from_ldb_results(TALLOC_CTX *mem_ctx, struct ldb_context *ldb,
schema = dsdb_new_schema(mem_ctx);
if (!schema) {
dsdb_oom(error_string, mem_ctx);
- return LDB_ERR_OPERATIONS_ERROR;
+ return ldb_operr(ldb);
}
schema->base_dn = talloc_steal(schema, schema_res->msgs[0]->dn);
@@ -751,7 +750,7 @@ int dsdb_schema_from_ldb_results(TALLOC_CTX *mem_ctx, struct ldb_context *ldb,
"schema_fsmo_init: dsdb_schema_info_blob_new() failed - %s",
win_errstr(status));
DEBUG(0,(__location__ ": %s\n", *error_string));
- return LDB_ERR_OPERATIONS_ERROR;
+ return ldb_operr(ldb);
}
info_val = &info_val_default;
}