summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-04-13 09:53:28 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-04-13 15:26:55 +0200
commit7d5a8c3506b3bb4005820ce2ab6687bbf9c2dd40 (patch)
tree0406207278b49b2bb42239862fd05f3331828b77 /source4/torture/rpc
parentaa02f4425579d5fb45da3216462273c973fcaa64 (diff)
downloadsamba-7d5a8c3506b3bb4005820ce2ab6687bbf9c2dd40.tar.gz
samba-7d5a8c3506b3bb4005820ce2ab6687bbf9c2dd40.tar.bz2
samba-7d5a8c3506b3bb4005820ce2ab6687bbf9c2dd40.zip
s4:torture/netlogon - enhance test for "dcesrv_netr_DsRGetDCNameEx2"
Test for right domainname handling.
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/netlogon.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index c469de9ec9..5b3bcff3ff 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -2193,6 +2193,13 @@ static bool test_netr_DsRGetDCName(struct torture_context *tctx,
status = dcerpc_netr_DsRGetDCName_r(b, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "DsRGetDCName");
torture_assert_werr_ok(tctx, r.out.result, "DsRGetDCName");
+
+ r.in.domain_name = lp_workgroup(tctx->lp_ctx);
+
+ status = dcerpc_netr_DsRGetDCName_r(b, tctx, &r);
+ torture_assert_ntstatus_ok(tctx, status, "DsRGetDCName");
+ torture_assert_werr_ok(tctx, r.out.result, "DsRGetDCName");
+
return test_netr_DsRGetSiteName(p, tctx,
info->dc_unc,
info->dc_site_name);
@@ -2220,6 +2227,12 @@ static bool test_netr_DsRGetDCNameEx(struct torture_context *tctx,
torture_assert_ntstatus_ok(tctx, status, "netr_DsRGetDCNameEx");
torture_assert_werr_ok(tctx, r.out.result, "netr_DsRGetDCNameEx");
+ r.in.domain_name = lp_workgroup(tctx->lp_ctx);
+
+ status = dcerpc_netr_DsRGetDCNameEx_r(b, 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, info->dc_unc,
info->dc_site_name);
}
@@ -2250,6 +2263,12 @@ static bool test_netr_DsRGetDCNameEx2(struct torture_context *tctx,
torture_assert_ntstatus_ok(tctx, status, "netr_DsRGetDCNameEx2");
torture_assert_werr_ok(tctx, r.out.result, "netr_DsRGetDCNameEx2");
+ r.in.domain_name = lp_workgroup(tctx->lp_ctx);
+
+ status = dcerpc_netr_DsRGetDCNameEx2_r(b, tctx, &r);
+ torture_assert_ntstatus_ok(tctx, status, "netr_DsRGetDCNameEx2");
+ torture_assert_werr_ok(tctx, r.out.result, "netr_DsRGetDCNameEx2");
+
torture_comment(tctx, "Testing netr_DsRGetDCNameEx2 with client acount\n");
r.in.client_account = TEST_MACHINE_NAME"$";
r.in.mask = ACB_SVRTRUST;
@@ -2259,6 +2278,7 @@ static bool test_netr_DsRGetDCNameEx2(struct torture_context *tctx,
status = dcerpc_netr_DsRGetDCNameEx2_r(b, 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, info->dc_unc,
info->dc_site_name);
}