diff options
author | Günther Deschner <gd@samba.org> | 2008-10-24 13:43:21 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-10-27 19:33:23 +0100 |
commit | 92f1c0d1565f0b3d60c7235d6760926739a55426 (patch) | |
tree | e13eb49afdef9cba04e7c9237f514dfdaeb02cef /source4/torture | |
parent | 992c03a1926cfbf6fb814583e4e2c1db810dd966 (diff) | |
download | samba-92f1c0d1565f0b3d60c7235d6760926739a55426.tar.gz samba-92f1c0d1565f0b3d60c7235d6760926739a55426.tar.bz2 samba-92f1c0d1565f0b3d60c7235d6760926739a55426.zip |
s4-lsa: merge lsa_LookupNames/{2,3,4} from s3 lsa idl.
Guenther
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/ndr/lsa.c | 9 | ||||
-rw-r--r-- | source4/torture/rpc/lsa.c | 10 | ||||
-rw-r--r-- | source4/torture/rpc/samba3rpc.c | 4 |
3 files changed, 18 insertions, 5 deletions
diff --git a/source4/torture/ndr/lsa.c b/source4/torture/ndr/lsa.c index 6f580bd8d8..68eb36ebbd 100644 --- a/source4/torture/ndr/lsa.c +++ b/source4/torture/ndr/lsa.c @@ -428,11 +428,12 @@ static const uint8_t lsarlookupnames_out_data[] = { static bool lsarlookupnames_out_check(struct torture_context *tctx, struct lsa_LookupNames *r) { + struct lsa_RefDomainList *domains = *(r->out.domains); torture_assert(tctx, r->out.domains != NULL, "domains ptr"); - torture_assert_int_equal(tctx, r->out.domains->count, 1, "domains count"); - torture_assert_int_equal(tctx, r->out.domains->max_size, 32, "domains size"); - torture_assert(tctx, r->out.domains->domains != NULL, "domains domains"); - torture_assert_str_equal(tctx, r->out.domains->domains[0].name.string, "BUILTIN", "domain name"); + torture_assert_int_equal(tctx, domains->count, 1, "domains count"); + torture_assert_int_equal(tctx, domains->max_size, 32, "domains size"); + torture_assert(tctx, domains->domains != NULL, "domains domains"); + torture_assert_str_equal(tctx, domains->domains[0].name.string, "BUILTIN", "domain name"); /* FIXME: SID */ torture_assert(tctx, r->out.count != NULL, "count ptr"); torture_assert_int_equal(tctx, *r->out.count, 100, "count"); diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c index ea9435bd95..a4dd2e13dd 100644 --- a/source4/torture/rpc/lsa.c +++ b/source4/torture/rpc/lsa.c @@ -153,6 +153,7 @@ static bool test_LookupNames(struct dcerpc_pipe *p, { struct lsa_LookupNames r; struct lsa_TransSidArray sids; + struct lsa_RefDomainList *domains = NULL; struct lsa_String *names; uint32_t count = 0; NTSTATUS status; @@ -176,6 +177,7 @@ static bool test_LookupNames(struct dcerpc_pipe *p, r.in.count = &count; r.out.count = &count; r.out.sids = &sids; + r.out.domains = &domains; status = dcerpc_lsa_LookupNames(p, mem_ctx, &r); @@ -217,6 +219,7 @@ static bool test_LookupNames_bogus(struct dcerpc_pipe *p, { struct lsa_LookupNames r; struct lsa_TransSidArray sids; + struct lsa_RefDomainList *domains = NULL; struct lsa_String *names; uint32_t count = 0; NTSTATUS status; @@ -248,6 +251,7 @@ static bool test_LookupNames_bogus(struct dcerpc_pipe *p, r.in.count = &count; r.out.count = &count; r.out.sids = &sids; + r.out.domains = &domains; status = dcerpc_lsa_LookupNames(p, mem_ctx, &r); if (!NT_STATUS_EQUAL(status, NT_STATUS_NONE_MAPPED)) { @@ -317,6 +321,7 @@ static bool test_LookupNames2(struct dcerpc_pipe *p, { struct lsa_LookupNames2 r; struct lsa_TransSidArray2 sids; + struct lsa_RefDomainList *domains = NULL; struct lsa_String *names; uint32_t count = 0; NTSTATUS status; @@ -342,6 +347,7 @@ static bool test_LookupNames2(struct dcerpc_pipe *p, r.in.client_revision = 0; r.out.count = &count; r.out.sids = &sids; + r.out.domains = &domains; status = dcerpc_lsa_LookupNames2(p, mem_ctx, &r); if (!NT_STATUS_IS_OK(status)) { @@ -362,6 +368,7 @@ static bool test_LookupNames3(struct dcerpc_pipe *p, { struct lsa_LookupNames3 r; struct lsa_TransSidArray3 sids; + struct lsa_RefDomainList *domains = NULL; struct lsa_String *names; uint32_t count = 0; NTSTATUS status; @@ -387,6 +394,7 @@ static bool test_LookupNames3(struct dcerpc_pipe *p, r.in.client_revision = 0; r.out.count = &count; r.out.sids = &sids; + r.out.domains = &domains; status = dcerpc_lsa_LookupNames3(p, mem_ctx, &r); if (!NT_STATUS_IS_OK(status)) { @@ -405,6 +413,7 @@ static bool test_LookupNames4(struct dcerpc_pipe *p, { struct lsa_LookupNames4 r; struct lsa_TransSidArray3 sids; + struct lsa_RefDomainList *domains = NULL; struct lsa_String *names; uint32_t count = 0; NTSTATUS status; @@ -429,6 +438,7 @@ static bool test_LookupNames4(struct dcerpc_pipe *p, r.in.client_revision = 0; r.out.count = &count; r.out.sids = &sids; + r.out.domains = &domains; status = dcerpc_lsa_LookupNames4(p, mem_ctx, &r); if (!NT_STATUS_IS_OK(status)) { diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c index 25cbb6727d..dc904fccf1 100644 --- a/source4/torture/rpc/samba3rpc.c +++ b/source4/torture/rpc/samba3rpc.c @@ -1500,6 +1500,7 @@ static struct dom_sid *name2sid(TALLOC_CTX *mem_ctx, struct policy_handle handle; struct lsa_LookupNames l; struct lsa_TransSidArray sids; + struct lsa_RefDomainList *domains = NULL; struct lsa_String lsa_name; uint32_t count = 0; struct dom_sid *result; @@ -1546,6 +1547,7 @@ static struct dom_sid *name2sid(TALLOC_CTX *mem_ctx, l.in.count = &count; l.out.count = &count; l.out.sids = &sids; + l.out.domains = &domains; status = dcerpc_lsa_LookupNames(p, tmp_ctx, &l); if (!NT_STATUS_IS_OK(status)) { @@ -1555,7 +1557,7 @@ static struct dom_sid *name2sid(TALLOC_CTX *mem_ctx, return NULL; } - result = dom_sid_add_rid(mem_ctx, l.out.domains->domains[0].sid, + result = dom_sid_add_rid(mem_ctx, domains->domains[0].sid, l.out.sids->sids[0].rid); c.in.handle = &handle; |