From 58bb944d81a42844df3a57d4a58e07b95ad35fb6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 2 Sep 2004 11:06:23 +0000 Subject: r2181: an rpc async test on the netlogon pipe (This used to be commit 4c370c3c917f399497f936a2037ea2868b2196d2) --- source4/torture/rpc/netlogon.c | 71 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) (limited to 'source4/torture/rpc') diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c index 1dec1f5109..d5acfa8c36 100644 --- a/source4/torture/rpc/netlogon.c +++ b/source4/torture/rpc/netlogon.c @@ -1625,6 +1625,73 @@ static BOOL test_GetDomainInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) } +static BOOL test_GetDomainInfo_async(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) +{ + NTSTATUS status; + struct netr_LogonGetDomainInfo r; + struct netr_DomainQuery1 q1; + struct netr_Authenticator a; +#define ASYNC_COUNT 100 + struct creds_CredentialState creds; + struct creds_CredentialState creds_async[ASYNC_COUNT]; + struct rpc_request *req[ASYNC_COUNT]; + int i; + + if (!test_SetupCredentials3(p, mem_ctx, NETLOGON_NEG_AUTH2_ADS_FLAGS, &creds)) { + return False; + } + + ZERO_STRUCT(r); + r.in.server_name = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p)); + r.in.computer_name = TEST_MACHINE_NAME; + r.in.unknown1 = 512; + r.in.level = 1; + r.in.credential = &a; + r.out.credential = &a; + + r.in.i1[0] = 0; + r.in.i1[1] = 0; + + r.in.query.query1 = &q1; + ZERO_STRUCT(q1); + + /* this should really be the fully qualified name */ + q1.workstation_domain = TEST_MACHINE_NAME; + q1.workstation_site = "Default-First-Site-Name"; + q1.blob2.length = 0; + q1.blob2.size = 0; + q1.blob2.data = NULL; + q1.product.string = "product string"; + + printf("Testing netr_LogonGetDomainInfo - async count %d\n", ASYNC_COUNT); + + for (i=0;i