diff options
-rw-r--r-- | source4/dsdb/repl/replicated_objects.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source4/dsdb/repl/replicated_objects.c b/source4/dsdb/repl/replicated_objects.c index 5997073a8a..0def815c5f 100644 --- a/source4/dsdb/repl/replicated_objects.c +++ b/source4/dsdb/repl/replicated_objects.c @@ -445,6 +445,7 @@ WERROR dsdb_replicated_objects_commit(struct ldb_context *ldb, struct dsdb_extended_replicated_objects *objects, uint64_t *notify_uSN) { + WERROR werr; struct ldb_result *ext_res; struct dsdb_schema *cur_schema = NULL; int ret; @@ -503,6 +504,23 @@ WERROR dsdb_replicated_objects_commit(struct ldb_context *ldb, } talloc_free(ext_res); + /* Save our updated prefixMap */ + if (working_schema) { + werr = dsdb_write_prefixes_from_schema_to_ldb(working_schema, + ldb, + working_schema); + if (!W_ERROR_IS_OK(werr)) { + /* restore previous schema */ + if (cur_schema ) { + dsdb_reference_schema(ldb, cur_schema, false); + dsdb_make_schema_global(ldb, cur_schema); + } + DEBUG(0,("Failed to save updated prefixMap: %s\n", + win_errstr(werr))); + return werr; + } + } + ret = ldb_transaction_prepare_commit(ldb); if (ret != LDB_SUCCESS) { /* restore previous schema */ |