diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-05-28 13:23:30 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:56:20 -0500 |
commit | d9538e7412c593a9dc10a600676939d2cf0205ea (patch) | |
tree | 0ff1ce915a7c076facc22cc8e63d1fcf55e2215c /source4/torture/rpc | |
parent | 90341da78b10beb4fa0bdbc8de35d44373c27fbf (diff) | |
download | samba-d9538e7412c593a9dc10a600676939d2cf0205ea.tar.gz samba-d9538e7412c593a9dc10a600676939d2cf0205ea.tar.bz2 samba-d9538e7412c593a9dc10a600676939d2cf0205ea.zip |
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)
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; |