summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-10-28 01:43:06 +0100
committerGünther Deschner <gd@samba.org>2008-10-29 08:56:52 +0100
commitf0697b0ad55fb1915541bf15adc8a4954462f005 (patch)
tree8484d27d9b92479a004475e3875704e0013f78e9 /source4/torture
parentf82a11783286abf30c8a36cc46a5098b3284d65d (diff)
downloadsamba-f0697b0ad55fb1915541bf15adc8a4954462f005.tar.gz
samba-f0697b0ad55fb1915541bf15adc8a4954462f005.tar.bz2
samba-f0697b0ad55fb1915541bf15adc8a4954462f005.zip
s4-netlogon: merge netr_DsRGetDCName{Ex,Ex2} from s3 idl.
Guenther
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/netlogon.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index 5f8e2fc21b..f23af7e72a 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -1267,19 +1267,21 @@ static bool test_netr_DsRGetDCName(struct torture_context *tctx,
{
NTSTATUS status;
struct netr_DsRGetDCName r;
+ struct netr_DsRGetDCNameInfo *info = NULL;
r.in.server_unc = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
r.in.domain_name = talloc_asprintf(tctx, "%s", lp_realm(tctx->lp_ctx));
r.in.domain_guid = NULL;
r.in.site_guid = NULL;
r.in.flags = DS_RETURN_DNS_NAME;
+ r.out.info = &info;
status = dcerpc_netr_DsRGetDCName(p, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "DsRGetDCName");
torture_assert_werr_ok(tctx, r.out.result, "DsRGetDCName");
return test_netr_DsRGetSiteName(p, tctx,
- r.out.info->dc_unc,
- r.out.info->dc_site_name);
+ info->dc_unc,
+ info->dc_site_name);
}
/*
@@ -1290,19 +1292,21 @@ static bool test_netr_DsRGetDCNameEx(struct torture_context *tctx,
{
NTSTATUS status;
struct netr_DsRGetDCNameEx r;
+ struct netr_DsRGetDCNameInfo *info = NULL;
r.in.server_unc = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
r.in.domain_name = talloc_asprintf(tctx, "%s", lp_realm(tctx->lp_ctx));
r.in.domain_guid = NULL;
r.in.site_name = NULL;
r.in.flags = DS_RETURN_DNS_NAME;
+ r.out.info = &info;
status = dcerpc_netr_DsRGetDCNameEx(p, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "netr_DsRGetDCNameEx");
torture_assert_werr_ok(tctx, r.out.result, "netr_DsRGetDCNameEx");
- return test_netr_DsRGetSiteName(p, tctx, r.out.info->dc_unc,
- r.out.info->dc_site_name);
+ return test_netr_DsRGetSiteName(p, tctx, info->dc_unc,
+ info->dc_site_name);
}
/*
@@ -1313,6 +1317,7 @@ static bool test_netr_DsRGetDCNameEx2(struct torture_context *tctx,
{
NTSTATUS status;
struct netr_DsRGetDCNameEx2 r;
+ struct netr_DsRGetDCNameInfo *info = NULL;
r.in.server_unc = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
r.in.client_account = NULL;
@@ -1321,6 +1326,7 @@ static bool test_netr_DsRGetDCNameEx2(struct torture_context *tctx,
r.in.domain_guid = NULL;
r.in.site_name = NULL;
r.in.flags = DS_RETURN_DNS_NAME;
+ r.out.info = &info;
torture_comment(tctx, "Testing netr_DsRGetDCNameEx2 without client account\n");
@@ -1332,12 +1338,13 @@ static bool test_netr_DsRGetDCNameEx2(struct torture_context *tctx,
r.in.client_account = TEST_MACHINE_NAME"$";
r.in.mask = ACB_SVRTRUST;
r.in.flags = DS_RETURN_FLAT_NAME;
+ r.out.info = &info;
status = dcerpc_netr_DsRGetDCNameEx2(p, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "netr_DsRGetDCNameEx2");
torture_assert_werr_ok(tctx, r.out.result, "netr_DsRGetDCNameEx2");
- return test_netr_DsRGetSiteName(p, tctx, r.out.info->dc_unc,
- r.out.info->dc_site_name);
+ return test_netr_DsRGetSiteName(p, tctx, info->dc_unc,
+ info->dc_site_name);
}
static bool test_netr_DsrGetDcSiteCoverageW(struct torture_context *tctx,