summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2010-12-10 03:55:24 +0200
committerKamen Mazdrashki <kamenim@samba.org>2010-12-15 00:51:19 +0100
commit18744a95312666cad2c646c2bb550da4277968c1 (patch)
tree0557303d78bb4368e795d69f7b5449f8bc7ba7b5 /source4/dsdb
parentc94e5d44385d23172a8776e4c12d71e30c9c6616 (diff)
downloadsamba-18744a95312666cad2c646c2bb550da4277968c1.tar.gz
samba-18744a95312666cad2c646c2bb550da4277968c1.tar.bz2
samba-18744a95312666cad2c646c2bb550da4277968c1.zip
s4-drepl: User working schema for commiting objects when replicating Schema NC
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/repl/drepl_out_helpers.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/source4/dsdb/repl/drepl_out_helpers.c b/source4/dsdb/repl/drepl_out_helpers.c
index 8c5c9da6c3..6481028a42 100644
--- a/source4/dsdb/repl/drepl_out_helpers.c
+++ b/source4/dsdb/repl/drepl_out_helpers.c
@@ -542,7 +542,7 @@ static void dreplsrv_op_pull_source_apply_changes_trigger(struct tevent_req *req
struct dreplsrv_partition *partition = state->op->source_dsa->partition;
struct dreplsrv_drsuapi_connection *drsuapi = state->op->source_dsa->conn->drsuapi;
struct dsdb_schema *schema;
- struct dsdb_schema *working_schema;
+ struct dsdb_schema *working_schema = NULL;
const struct drsuapi_DsReplicaOIDMapping_Ctr *mapping_ctr;
uint32_t object_count;
struct drsuapi_DsReplicaObjectListItemEx *first_object;
@@ -589,7 +589,7 @@ static void dreplsrv_op_pull_source_apply_changes_trigger(struct tevent_req *req
}
/* Decide what working schema to use for object conversion */
- if (ldb_dn_compare(partition->dn, ldb_get_schema_basedn(service->samdb)) == 0) {
+ if (ldb_dn_compare(partition->dn, schema->base_dn) == 0) {
/* create working schema to convert objects with */
status = dsdb_repl_make_working_schema(service->samdb,
schema,
@@ -604,12 +604,10 @@ static void dreplsrv_op_pull_source_apply_changes_trigger(struct tevent_req *req
tevent_req_nterror(req, NT_STATUS_INTERNAL_ERROR);
return;
}
- } else {
- working_schema = schema;
}
status = dsdb_replicated_objects_convert(service->samdb,
- working_schema,
+ working_schema ? working_schema : schema,
partition->nc.dn,
mapping_ctr,
object_count,
@@ -629,7 +627,7 @@ static void dreplsrv_op_pull_source_apply_changes_trigger(struct tevent_req *req
}
status = dsdb_replicated_objects_commit(service->samdb,
- NULL,
+ working_schema,
objects,
&state->op->source_dsa->notify_uSN);
talloc_free(objects);