libnet: Initialize req_level in become_dc tests
authorTim Beale <timbeale@catalyst.net.nz>
Sun, 18 Jun 2017 22:26:48 +0000 (10:26 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 27 Jul 2017 22:25:15 +0000 (00:25 +0200)
The net.api.become.dc tests would always pass the request into
libnet_vampire_cb_store_chunk() with req_level=0, which meant that
storing the chunk didn't use the correct replica_flags/exop.

I noticed this problem when working on client-side support for GET_TGT.
My changes relied on the critical-only request flag being passed down
into replmd, but because the request flags weren't passed correctly, my
changes caused the become_dc tests to fail.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/libnet/libnet_become_dc.c

index 43a32099a547d228ffec534abb88d142d9bea764..e9153a049221e457641dbe94bc455ae9d114e82f 100644 (file)
@@ -2673,7 +2673,7 @@ static WERROR becomeDC_drsuapi_pull_partition_recv(struct libnet_BecomeDC_state
                                                   struct libnet_BecomeDC_Partition *partition,
                                                   struct drsuapi_DsGetNCChanges *r)
 {
-       uint32_t req_level = 0;
+       uint32_t req_level = r->in.level;
        struct drsuapi_DsGetNCChangesRequest5 *req5 = NULL;
        struct drsuapi_DsGetNCChangesRequest8 *req8 = NULL;
        struct drsuapi_DsGetNCChangesRequest10 *req10 = NULL;