From: Andrew Tridgell Date: Mon, 17 Aug 2009 01:13:23 +0000 (+1000) Subject: make sure we update the current schema->prefixes when we add a new prefix X-Git-Url: http://git.samba.org/?p=metze%2Fsamba%2Fwip.git;a=commitdiff_plain;h=f890dba084062b1fc52f4eae249b5fb6c16e69eb 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 --- diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c index dfa745e305c6..170d5a12e970 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; }