From d9538e7412c593a9dc10a600676939d2cf0205ea Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 28 May 2004 13:23:30 +0000 Subject: r937: - added a simple QuerySecurity implementation in samr server - moved some sec desc defines into misc.idl - fixed pw_len field in UserInfo26 - made some pipes available on TCP - added netr_DsrEnumerateDomainTrusts() to netlogon - added templates for remaining netlogon IDL calls (from ethereal) - added a unistr_noterm vs unistr error detector in ndr basic decoder - added torture test for netr_DsrEnumerateDomainTrusts() (This used to be commit ae5a5113fb83640dcb9ae4642c1b9eaf28487956) --- source4/torture/rpc/netlogon.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'source4/torture/rpc/netlogon.c') diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c index 8fd4a0fd4c..0fbd03fb83 100644 --- a/source4/torture/rpc/netlogon.c +++ b/source4/torture/rpc/netlogon.c @@ -1561,6 +1561,30 @@ static BOOL test_LogonControl2Ex(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) } +/* + try a netlogon netr_DsrEnumerateDomainTrusts +*/ +static BOOL test_DsrEnumerateDomainTrusts(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) +{ + NTSTATUS status; + struct netr_DsrEnumerateDomainTrusts r; + + r.in.server_name = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p)); + r.in.trust_flags = 0x3f; + + printf("Testing netr_DsrEnumerateDomainTrusts\n"); + + status = dcerpc_netr_DsrEnumerateDomainTrusts(p, mem_ctx, &r); + if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(r.out.result)) { + printf("netr_DsrEnumerateDomainTrusts - %s/%s\n", + nt_errstr(status), win_errstr(r.out.result)); + return False; + } + + return True; +} + + BOOL torture_rpc_netlogon(int dummy) { @@ -1640,6 +1664,10 @@ BOOL torture_rpc_netlogon(int dummy) ret = False; } + if (!test_DsrEnumerateDomainTrusts(p, mem_ctx)) { + ret = False; + } + torture_rpc_close(p); if (!leave_domain_bdc(mem_ctx)) { -- cgit