From c94e5d44385d23172a8776e4c12d71e30c9c6616 Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Fri, 10 Dec 2010 02:55:30 +0200 Subject: s4-repl: Allow dsdb_replicated_objects_commit() to use different schema while committing objects working_schema is to be used while committing a Schema replica. When we replicate Schema, then we most probably won't be able to convert all replicated objects using the current Schema cache (as we don't know anything about those new objects). Thus, during Schema replication, we make a temporary working_schema that contains both our current Schema + all objects we get on the wire. When we commit those new objects, we should use our working_schema (by setting it to the ldb), and after all changes are commited, we can refresh the schema cache so we have a brand new, full-featured Schema cache --- source4/libnet/libnet_vampire.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/libnet') diff --git a/source4/libnet/libnet_vampire.c b/source4/libnet/libnet_vampire.c index 1d7d7268ae..40cf01ed52 100644 --- a/source4/libnet/libnet_vampire.c +++ b/source4/libnet/libnet_vampire.c @@ -446,7 +446,7 @@ static NTSTATUS libnet_vampire_cb_apply_schema(struct libnet_vampire_cb_state *s } } - status = dsdb_replicated_objects_commit(s->ldb, schema_objs, &seq_num); + status = dsdb_replicated_objects_commit(s->ldb, NULL, schema_objs, &seq_num); if (!W_ERROR_IS_OK(status)) { DEBUG(0,("Failed to commit objects: %s\n", win_errstr(status))); return werror_to_ntstatus(status); @@ -720,7 +720,7 @@ NTSTATUS libnet_vampire_cb_store_chunk(void *private_data, NDR_PRINT_DEBUG(replPropertyMetaDataBlob, objs->objects[i].meta_data); } } - status = dsdb_replicated_objects_commit(s->ldb, objs, &seq_num); + status = dsdb_replicated_objects_commit(s->ldb, NULL, objs, &seq_num); if (!W_ERROR_IS_OK(status)) { DEBUG(0,("Failed to commit objects: %s\n", win_errstr(status))); return werror_to_ntstatus(status); -- cgit