From 6ddaf5f160ff96cb6d17bcd78588cab594b8f151 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 17 Oct 2008 20:08:59 +0200 Subject: s4-drsuapi: merge drsuapi_DsCrackNames from s3 drsuapi idl. Guenther --- source4/torture/rpc/dssync.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'source4/torture/rpc/dssync.c') diff --git a/source4/torture/rpc/dssync.c b/source4/torture/rpc/dssync.c index 2070485a19..a832c0f0da 100644 --- a/source4/torture/rpc/dssync.c +++ b/source4/torture/rpc/dssync.c @@ -265,6 +265,9 @@ static bool test_GetInfo(struct torture_context *tctx, struct DsSyncTest *ctx) { NTSTATUS status; struct drsuapi_DsCrackNames r; + union drsuapi_DsNameRequest req; + union drsuapi_DsNameCtr ctr; + int32_t level_out = 0; struct drsuapi_DsNameString names[1]; bool ret = true; struct cldap_socket *cldap; @@ -274,15 +277,19 @@ static bool test_GetInfo(struct torture_context *tctx, struct DsSyncTest *ctx) r.in.bind_handle = &ctx->admin.drsuapi.bind_handle; r.in.level = 1; - r.in.req.req1.codepage = 1252; /* western european */ - r.in.req.req1.language = 0x00000407; /* german */ - r.in.req.req1.count = 1; - r.in.req.req1.names = names; - r.in.req.req1.format_flags = DRSUAPI_DS_NAME_FLAG_NO_FLAGS; - r.in.req.req1.format_offered = DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT; - r.in.req.req1.format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779; + r.in.req = &req; + r.in.req->req1.codepage = 1252; /* western european */ + r.in.req->req1.language = 0x00000407; /* german */ + r.in.req->req1.count = 1; + r.in.req->req1.names = names; + r.in.req->req1.format_flags = DRSUAPI_DS_NAME_FLAG_NO_FLAGS; + r.in.req->req1.format_offered = DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT; + r.in.req->req1.format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779; names[0].str = talloc_asprintf(ctx, "%s\\", lp_workgroup(tctx->lp_ctx)); + r.out.level_out = &level_out; + r.out.ctr = &ctr; + status = dcerpc_drsuapi_DsCrackNames(ctx->admin.drsuapi.pipe, ctx, &r); if (!NT_STATUS_IS_OK(status)) { const char *errstr = nt_errstr(status); @@ -296,7 +303,7 @@ static bool test_GetInfo(struct torture_context *tctx, struct DsSyncTest *ctx) return false; } - ctx->domain_dn = r.out.ctr.ctr1->array[0].result_name; + ctx->domain_dn = r.out.ctr->ctr1->array[0].result_name; ZERO_STRUCT(search); search.in.dest_address = ctx->drsuapi_binding->host; -- cgit