summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-12-21 21:13:59 +1100
committerAndrew Tridgell <tridge@samba.org>2010-01-02 08:16:52 +1100
commitff6dd4a67fe74349a8e54766f2f0f91ded06a742 (patch)
tree25d012dabd76ecd606bb47e24e4bee43e74e491b /source4
parent5bf257fa9ba32ec31886be34edff35eb41f885d4 (diff)
downloadsamba-ff6dd4a67fe74349a8e54766f2f0f91ded06a742.tar.gz
samba-ff6dd4a67fe74349a8e54766f2f0f91ded06a742.tar.bz2
samba-ff6dd4a67fe74349a8e54766f2f0f91ded06a742.zip
s4-drs: send all linked attributes at the end of a replication cycle
This ensures that a link is not seen before the object it points to
Diffstat (limited to 'source4')
-rw-r--r--source4/rpc_server/drsuapi/getncchanges.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c
index 18c9242a10..8ff5de5dc0 100644
--- a/source4/rpc_server/drsuapi/getncchanges.c
+++ b/source4/rpc_server/drsuapi/getncchanges.c
@@ -522,6 +522,8 @@ struct drsuapi_getncchanges_state {
uint64_t min_usn;
uint64_t highest_usn;
struct ldb_dn *last_dn;
+ struct drsuapi_DsReplicaLinkedAttribute *la_list;
+ uint32_t la_count;
};
/*
@@ -782,13 +784,13 @@ WERROR dcesrv_drsuapi_DsGetNCChanges(struct dcesrv_call_state *dce_call, TALLOC_
return werr;
}
- werr = get_nc_changes_add_links(b_state->sam_ctx, mem_ctx,
+ werr = get_nc_changes_add_links(b_state->sam_ctx, getnc_state,
getnc_state->ncRoot_dn,
schema, getnc_state->min_usn,
req8->replica_flags,
msg,
- &r->out.ctr->ctr6.linked_attributes,
- &r->out.ctr->ctr6.linked_attributes_count);
+ &getnc_state->la_list,
+ &getnc_state->la_count);
if (!W_ERROR_IS_OK(werr)) {
return werr;
}
@@ -842,6 +844,8 @@ WERROR dcesrv_drsuapi_DsGetNCChanges(struct dcesrv_call_state *dce_call, TALLOC_
if (i < getnc_state->site_res->count) {
r->out.ctr->ctr6.more_data = true;
} else {
+ r->out.ctr->ctr6.linked_attributes_count = getnc_state->la_count;
+ r->out.ctr->ctr6.linked_attributes = talloc_steal(mem_ctx, getnc_state->la_list);
r->out.ctr->ctr6.uptodateness_vector = talloc(mem_ctx, struct drsuapi_DsReplicaCursor2CtrEx);
r->out.ctr->ctr6.uptodateness_vector->version = 2;
r->out.ctr->ctr6.uptodateness_vector->reserved1 = 0;