From bf7a27c3975c3822e0de8ff15730e6d6d1f46457 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 13 Jan 2011 17:18:24 +0100 Subject: s3:libnet: add 'process_links' to dssync_ops This allows the backend to handle linked attributes. metze --- source3/libnet/libnet_dssync.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'source3/libnet/libnet_dssync.c') diff --git a/source3/libnet/libnet_dssync.c b/source3/libnet/libnet_dssync.c index 3aed8b68ed..64a4df0f7f 100644 --- a/source3/libnet/libnet_dssync.c +++ b/source3/libnet/libnet_dssync.c @@ -451,6 +451,8 @@ static NTSTATUS libnet_dssync_getncchanges(TALLOC_CTX *mem_ctx, for (y=0, last_query = false; !last_query; y++) { struct drsuapi_DsReplicaObjectListItemEx *first_object = NULL; struct drsuapi_DsReplicaOIDMapping_Ctr *mapping_ctr = NULL; + uint32_t linked_attributes_count = 0; + struct drsuapi_DsReplicaLinkedAttribute *linked_attributes = NULL; if (level == 8) { DEBUG(1,("start[%d] tmp_higest_usn: %llu , highest_usn: %llu\n",y, @@ -537,6 +539,9 @@ static NTSTATUS libnet_dssync_getncchanges(TALLOC_CTX *mem_ctx, first_object = ctr6->first_object; mapping_ctr = &ctr6->mapping_ctr; + linked_attributes = ctr6->linked_attributes; + linked_attributes_count = ctr6->linked_attributes_count; + if (ctr6->more_data) { req->req8.highwatermark = ctr6->new_highwatermark; } else { @@ -576,6 +581,23 @@ static NTSTATUS libnet_dssync_getncchanges(TALLOC_CTX *mem_ctx, goto out; } } + + if (linked_attributes_count == 0) { + continue; + } + + if (ctx->ops->process_links) { + status = ctx->ops->process_links(ctx, mem_ctx, + linked_attributes_count, + linked_attributes, + mapping_ctr); + if (!NT_STATUS_IS_OK(status)) { + ctx->error_message = talloc_asprintf(ctx, + "Failed to call processing function: %s", + nt_errstr(status)); + goto out; + } + } } *pnew_utdv = new_utdv; -- cgit