diff options
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r-- | source4/torture/rpc/netlogon.c | 28 | ||||
-rw-r--r-- | source4/torture/rpc/samr.c | 4 |
2 files changed, 32 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)) { diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index a1b01b533f..a7a6482da9 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -134,6 +134,10 @@ static BOOL test_QuerySecurity(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, return False; } + if (s.in.sdbuf == NULL) { + return False; + } + s.in.handle = handle; s.in.sec_info = 7; s.in.sdbuf = r.out.sdbuf; |