summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/netlogon.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/rpc/netlogon.c')
-rw-r--r--source4/torture/rpc/netlogon.c28
1 files changed, 28 insertions, 0 deletions
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)) {