summaryrefslogtreecommitdiff
path: root/source4/dsdb/schema/schema_init.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-08-17 11:13:23 +1000
committerAndrew Tridgell <tridge@samba.org>2009-08-17 11:14:12 +1000
commitf890dba084062b1fc52f4eae249b5fb6c16e69eb (patch)
tree9a3c4b8ffef43c2fdfc6abeb7cb3a1211836cd14 /source4/dsdb/schema/schema_init.c
parent341477347db9477e0bc34cadce31088108866772 (diff)
downloadsamba-f890dba084062b1fc52f4eae249b5fb6c16e69eb.tar.gz
samba-f890dba084062b1fc52f4eae249b5fb6c16e69eb.tar.bz2
samba-f890dba084062b1fc52f4eae249b5fb6c16e69eb.zip
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
Diffstat (limited to 'source4/dsdb/schema/schema_init.c')
-rw-r--r--source4/dsdb/schema/schema_init.c9
1 files changed, 9 insertions, 0 deletions
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;
}