diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-09 10:01:24 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-09 10:01:24 +0000 |
commit | 3c669340f529c559bff88168c3f9ddac9790d6c3 (patch) | |
tree | a127d40007d1d3d2ed0c41e3be7983284ced9292 /source4/torture/rpc/lsa.c | |
parent | 4bba087298b45b3dd403a8ee0a50179bff72f6c4 (diff) | |
download | samba-3c669340f529c559bff88168c3f9ddac9790d6c3.tar.gz samba-3c669340f529c559bff88168c3f9ddac9790d6c3.tar.bz2 samba-3c669340f529c559bff88168c3f9ddac9790d6c3.zip |
added lsa_EnumTrustDom
(This used to be commit ef60a70912c70b11438b53ed033efe31f662143d)
Diffstat (limited to 'source4/torture/rpc/lsa.c')
-rw-r--r-- | source4/torture/rpc/lsa.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c index 8e3a36bb74..90db819a33 100644 --- a/source4/torture/rpc/lsa.c +++ b/source4/torture/rpc/lsa.c @@ -368,6 +368,42 @@ static BOOL test_EnumPrivs(struct dcerpc_pipe *p, } +static BOOL test_EnumTrustDom(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx, + struct policy_handle *handle) +{ + struct lsa_EnumTrustDom r; + NTSTATUS status; + int i; + uint32 resume_handle = 0; + + printf("\nTesting EnumTrustDom\n"); + + r.in.handle = handle; + r.in.resume_handle = &resume_handle; + r.in.num_entries = 1000; + r.out.resume_handle = &resume_handle; + + status = dcerpc_lsa_EnumTrustDom(p, mem_ctx, &r); + if (!NT_STATUS_IS_OK(status)) { + printf("EnumTrustDom failed - %s\n", nt_errstr(status)); + return False; + } + + if (r.out.domains) { + printf("lookup gave %d domains (max_count=%d)\n", + r.out.domains->count, + r.out.domains->max_count); + for (i=0;i<r.out.domains->count;i++) { + printf("name='%s' sid=%s\n", + r.out.domains->domains[i].name.name, + lsa_sid_string_talloc(mem_ctx, r.out.domains->domains[i].sid)); + } + } + + return True; +} + static BOOL test_Delete(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct policy_handle *handle) @@ -447,6 +483,10 @@ BOOL torture_rpc_lsa(int dummy) if (!test_EnumPrivs(p, mem_ctx, &handle)) { ret = False; } + + if (!test_EnumTrustDom(p, mem_ctx, &handle)) { + ret = False; + } #if 0 if (!test_Delete(p, mem_ctx, &handle)) { |