From f890dba084062b1fc52f4eae249b5fb6c16e69eb Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 17 Aug 2009 11:13:23 +1000 Subject: make sure we update the current schema->prefixes when we add a new prefix This triggered a failure in the updateNow schema test, as the current global schema was not being updated when a new schema element was added --- source4/dsdb/schema/schema_init.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source4/dsdb') diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c index dfa745e305..170d5a12e9 100644 --- a/source4/dsdb/schema/schema_init.c +++ b/source4/dsdb/schema/schema_init.c @@ -349,6 +349,13 @@ WERROR dsdb_create_prefix_mapping(struct ldb_context *ldb, struct dsdb_schema *s return status; } + talloc_free(schema->prefixes); + schema->prefixes = talloc_steal(schema, prefixes); + schema->num_prefixes = num_prefixes; + + DEBUG(2,(__location__ " Added prefixMap %s - now have %u prefixes\n", + full_oid, num_prefixes)); + talloc_free(mem_ctx); return status; } @@ -443,6 +450,8 @@ WERROR dsdb_find_prefix_for_oid(uint32_t num_prefixes, const struct dsdb_schema_ return WERR_OK; } + DEBUG(5,(__location__ " Failed to find oid %s - have %u prefixes\n", in, num_prefixes)); + return WERR_DS_NO_MSDS_INTID; } -- cgit