From 02df116352778c2bd1fd4053e7f183215216da2f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Dec 2003 10:08:26 +0000 Subject: added netr_GetDcName() - quite a useful call (This used to be commit 63f46b223e16a3495b4a4a48c6489f1f0d7d84c4) --- source4/torture/rpc/netlogon.c | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) (limited to 'source4/torture') diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c index 89f1a0132b..a38990bdc1 100644 --- a/source4/torture/rpc/netlogon.c +++ b/source4/torture/rpc/netlogon.c @@ -428,6 +428,28 @@ static BOOL test_AccountSync(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) return ret; } +/* + try a netlogon GetDcName +*/ +static BOOL test_GetDcName(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) +{ + NTSTATUS status; + struct netr_GetDcName r; + + r.in.logon_server = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p)); + r.in.domainname = lp_workgroup(); + + printf("Testing GetDcName\n"); + + status = dcerpc_netr_GetDcName(p, mem_ctx, &r); + if (!NT_STATUS_IS_OK(status)) { + printf("GetDcName - %s\n", nt_errstr(status)); + return False; + } + + return True; +} + BOOL torture_rpc_netlogon(int dummy) { @@ -448,11 +470,6 @@ BOOL torture_rpc_netlogon(int dummy) p->flags |= DCERPC_DEBUG_PRINT_BOTH; - if (!test_AccountSync(p, mem_ctx)) { - ret = False; - } - return ret; - if (!test_LogonUasLogon(p, mem_ctx)) { ret = False; } @@ -481,6 +498,14 @@ BOOL torture_rpc_netlogon(int dummy) ret = False; } + if (!test_AccountSync(p, mem_ctx)) { + ret = False; + } + + if (!test_GetDcName(p, mem_ctx)) { + ret = False; + } + torture_rpc_close(p); return ret; -- cgit