getncchanges: Fill in ctr6.linked_attributes with a pointer to a zero-length array
authorAndrew Bartlett <abartlet@samba.org>
Sun, 13 Mar 2016 22:10:04 +0000 (11:10 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 1 Jun 2016 08:27:19 +0000 (10:27 +0200)
Our newly run repl_exop tests expect this, matching Windows 2012R2

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
source4/rpc_server/drsuapi/getncchanges.c

index 806e31838b7f8fed15ca083120932dd58bd02cac..6b961bcfc4c94bf6319fa58062b22b91f5db3913 100644 (file)
@@ -1657,6 +1657,7 @@ WERROR dcesrv_drsuapi_DsGetNCChanges(struct dcesrv_call_state *dce_call, TALLOC_
        bool max_wait_reached = false;
        bool has_get_all_changes = false;
        struct GUID invocation_id;
+       static const struct drsuapi_DsReplicaLinkedAttribute no_linked_attr;
 
        DCESRV_PULL_HANDLE_WERR(h, r->in.bind_handle, DRSUAPI_BIND_HANDLE);
        b_state = h->data;
@@ -1668,12 +1669,15 @@ WERROR dcesrv_drsuapi_DsGetNCChanges(struct dcesrv_call_state *dce_call, TALLOC_
        *r->out.level_out = 6;
        /* TODO: linked attributes*/
        r->out.ctr->ctr6.linked_attributes_count = 0;
-       r->out.ctr->ctr6.linked_attributes = NULL;
+       r->out.ctr->ctr6.linked_attributes = discard_const_p(struct drsuapi_DsReplicaLinkedAttribute, &no_linked_attr);
 
        r->out.ctr->ctr6.object_count = 0;
        r->out.ctr->ctr6.nc_object_count = 0;
        r->out.ctr->ctr6.more_data = false;
        r->out.ctr->ctr6.uptodateness_vector = NULL;
+       r->out.ctr->ctr6.source_dsa_guid = *(samdb_ntds_objectGUID(sam_ctx));
+       r->out.ctr->ctr6.source_dsa_invocation_id = *(samdb_ntds_invocation_id(sam_ctx));
+       r->out.ctr->ctr6.first_object = NULL;
 
        /* a RODC doesn't allow for any replication */
        ret = samdb_rodc(sam_ctx, &am_rodc);
@@ -2037,7 +2041,6 @@ allowed:
        r->out.ctr->ctr6.old_highwatermark = req10->highwatermark;
        r->out.ctr->ctr6.new_highwatermark = req10->highwatermark;
 
-       r->out.ctr->ctr6.first_object = NULL;
        currentObject = &r->out.ctr->ctr6.first_object;
 
        max_objects = lpcfg_parm_int(dce_call->conn->dce_ctx->lp_ctx, NULL, "drs", "max object sync", 1000);