From e8d9ccd57403910e1e1072bb46b4db63307884f8 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 14 Jan 2007 14:24:05 +0000 Subject: r20764: fix some little bugs metze (This used to be commit 1c3d1723e9a386038aaf34a5df7c279afa7d48a2) --- source4/dsdb/schema/schema_init.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c index 5803741e58..ba2db95ae1 100644 --- a/source4/dsdb/schema/schema_init.c +++ b/source4/dsdb/schema/schema_init.c @@ -108,8 +108,9 @@ WERROR dsdb_load_oid_mappings_ldb(struct dsdb_schema *schema, schema_info = data_blob_hex_string(pfm.ctr.dsdb.mappings, schemaInfo); W_ERROR_HAVE_NO_MEMORY(schema_info); - pfm.ctr.dsdb.mappings[pfm.ctr.dsdb.num_mappings - 1].id_prefix = 0; - pfm.ctr.dsdb.mappings[pfm.ctr.dsdb.num_mappings - 1].oid.oid = schema_info; + pfm.ctr.dsdb.mappings[pfm.ctr.dsdb.num_mappings - 1].id_prefix = 0; + pfm.ctr.dsdb.mappings[pfm.ctr.dsdb.num_mappings - 1].oid.__ndr_size = schemaInfo->length; + pfm.ctr.dsdb.mappings[pfm.ctr.dsdb.num_mappings - 1].oid.oid = schema_info; /* call the drsuapi version */ status = dsdb_load_oid_mappings_drsuapi(schema, &pfm.ctr.dsdb); @@ -125,7 +126,7 @@ WERROR dsdb_get_oid_mappings_drsuapi(const struct dsdb_schema *schema, struct drsuapi_DsReplicaOIDMapping_Ctr **_ctr) { struct drsuapi_DsReplicaOIDMapping_Ctr *ctr; - uint32_t i,j; + uint32_t i; ctr = talloc(mem_ctx, struct drsuapi_DsReplicaOIDMapping_Ctr); W_ERROR_HAVE_NO_MEMORY(ctr); @@ -138,7 +139,7 @@ WERROR dsdb_get_oid_mappings_drsuapi(const struct dsdb_schema *schema, for (i=0; i < schema->num_prefixes; i++) { ctr->mappings[i].id_prefix = schema->prefixes[i].id>>16; ctr->mappings[i].oid.oid = talloc_strndup(ctr->mappings, - schema->prefixes[j].oid, + schema->prefixes[i].oid, schema->prefixes[i].oid_len - 1); W_ERROR_HAVE_NO_MEMORY(ctr->mappings[i].oid.oid); } -- cgit