From ef37351f1846f042d132a3c54235291ed3311f11 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 29 Oct 2008 00:07:12 +0100 Subject: s4-netlogon: merge netr_DatabaseSync2 from s3 idl. Guenther --- source4/librpc/idl/netlogon.idl | 10 +++++----- source4/torture/rpc/netlogon.c | 22 +++++++++++++++++----- source4/torture/rpc/samsync.c | 21 ++++++++++++++++----- 3 files changed, 38 insertions(+), 15 deletions(-) (limited to 'source4') diff --git a/source4/librpc/idl/netlogon.idl b/source4/librpc/idl/netlogon.idl index cb05b2a2c9..e6ac70a863 100644 --- a/source4/librpc/idl/netlogon.idl +++ b/source4/librpc/idl/netlogon.idl @@ -940,13 +940,13 @@ interface netlogon NTSTATUS netr_DatabaseSync2( [in] [string,charset(UTF16)] uint16 logon_server[], [in] [string,charset(UTF16)] uint16 computername[], - [in] netr_Authenticator credential, - [in,out] netr_Authenticator return_authenticator, + [in,ref] netr_Authenticator *credential, + [in,out,ref] netr_Authenticator *return_authenticator, [in] netr_SamDatabaseID database_id, [in] uint16 restart_state, - [in,out] uint32 sync_context, - [in] uint32 preferredmaximumlength, - [out,unique] netr_DELTA_ENUM_ARRAY *delta_enum_array + [in,out,ref] uint32 *sync_context, + [out,ref] netr_DELTA_ENUM_ARRAY **delta_enum_array, + [in] uint32 preferredmaximumlength ); diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c index 29d833856c..174022248d 100644 --- a/source4/torture/rpc/netlogon.c +++ b/source4/torture/rpc/netlogon.c @@ -1075,6 +1075,9 @@ static bool test_DatabaseSync2(struct torture_context *tctx, { NTSTATUS status; struct netr_DatabaseSync2 r; + struct netr_DELTA_ENUM_ARRAY *delta_enum_array = NULL; + struct netr_Authenticator return_authenticator, credential; + struct creds_CredentialState *creds; const uint32_t database_ids[] = {0, 1, 2}; int i; @@ -1085,20 +1088,30 @@ static bool test_DatabaseSync2(struct torture_context *tctx, return false; } + ZERO_STRUCT(return_authenticator); + r.in.logon_server = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p)); r.in.computername = TEST_MACHINE_NAME; r.in.preferredmaximumlength = (uint32_t)-1; - ZERO_STRUCT(r.in.return_authenticator); + r.in.return_authenticator = &return_authenticator; + r.out.return_authenticator = &return_authenticator; + r.out.delta_enum_array = &delta_enum_array; for (i=0;icred)) { torture_comment(tctx, "Credential chaining failed\n"); } - r.in.sync_context = r.out.sync_context; } while (NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES)); } diff --git a/source4/torture/rpc/samsync.c b/source4/torture/rpc/samsync.c index 489080be27..12ddc934c9 100644 --- a/source4/torture/rpc/samsync.c +++ b/source4/torture/rpc/samsync.c @@ -1405,22 +1405,34 @@ static bool test_DatabaseSync2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, const uint32_t database_ids[] = {0, 1, 2}; int i; bool ret = true; + struct netr_Authenticator return_authenticator, credential; + struct netr_DELTA_ENUM_ARRAY *delta_enum_array = NULL; + + ZERO_STRUCT(return_authenticator); r.in.logon_server = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p)); r.in.computername = TEST_MACHINE_NAME; r.in.preferredmaximumlength = (uint32_t)-1; - ZERO_STRUCT(r.in.return_authenticator); + r.in.return_authenticator = &return_authenticator; + r.out.return_authenticator = &return_authenticator; + r.out.delta_enum_array = &delta_enum_array; for (i=0;icred)) { printf("Credential chaining failed\n"); } - r.in.sync_context = r.out.sync_context; talloc_free(loop_ctx); } while (NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES)); } -- cgit