diff options
author | Günther Deschner <gd@samba.org> | 2008-10-24 15:05:57 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-10-27 19:33:23 +0100 |
commit | 95231eae39d3373dbb2003d6c01f0c46c40cdc04 (patch) | |
tree | f894b50b5d9badf02c9c5a7a09f16f49b5607da2 /source4/torture | |
parent | 92f1c0d1565f0b3d60c7235d6760926739a55426 (diff) | |
download | samba-95231eae39d3373dbb2003d6c01f0c46c40cdc04.tar.gz samba-95231eae39d3373dbb2003d6c01f0c46c40cdc04.tar.bz2 samba-95231eae39d3373dbb2003d6c01f0c46c40cdc04.zip |
s4-lsa: merge lsa_QueryInfoPolicy/{2} from s3 lsa idl.
Guenther
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rpc/lsa.c | 30 | ||||
-rw-r--r-- | source4/torture/rpc/lsa_lookup.c | 4 | ||||
-rw-r--r-- | source4/torture/rpc/samba3rpc.c | 6 |
3 files changed, 24 insertions, 16 deletions
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c index a4dd2e13dd..454afabc50 100644 --- a/source4/torture/rpc/lsa.c +++ b/source4/torture/rpc/lsa.c @@ -2352,6 +2352,7 @@ static bool test_QueryInfoPolicyCalls( bool version2, struct policy_handle *handle) { struct lsa_QueryInfoPolicy r; + union lsa_PolicyInformation *info = NULL; NTSTATUS status; int i; bool ret = true; @@ -2364,6 +2365,7 @@ static bool test_QueryInfoPolicyCalls( bool version2, for (i=1;i<=14;i++) { r.in.handle = handle; r.in.level = i; + r.out.info = &info; if (version2) printf("\nTrying QueryInfoPolicy2 level %d\n", i); @@ -2433,33 +2435,33 @@ static bool test_QueryInfoPolicyCalls( bool version2, struct lsa_TransNameArray tnames; tnames.count = 14; tnames.names = talloc_zero_array(tctx, struct lsa_TranslatedName, tnames.count); - tnames.names[0].name.string = r.out.info->dns.name.string; + tnames.names[0].name.string = info->dns.name.string; tnames.names[0].sid_type = SID_NAME_DOMAIN; - tnames.names[1].name.string = r.out.info->dns.dns_domain.string; + tnames.names[1].name.string = info->dns.dns_domain.string; tnames.names[1].sid_type = SID_NAME_DOMAIN; - tnames.names[2].name.string = talloc_asprintf(tctx, "%s\\", r.out.info->dns.name.string); + tnames.names[2].name.string = talloc_asprintf(tctx, "%s\\", info->dns.name.string); tnames.names[2].sid_type = SID_NAME_DOMAIN; - tnames.names[3].name.string = talloc_asprintf(tctx, "%s\\", r.out.info->dns.dns_domain.string); + tnames.names[3].name.string = talloc_asprintf(tctx, "%s\\", info->dns.dns_domain.string); tnames.names[3].sid_type = SID_NAME_DOMAIN; - tnames.names[4].name.string = talloc_asprintf(tctx, "%s\\guest", r.out.info->dns.name.string); + tnames.names[4].name.string = talloc_asprintf(tctx, "%s\\guest", info->dns.name.string); tnames.names[4].sid_type = SID_NAME_USER; - tnames.names[5].name.string = talloc_asprintf(tctx, "%s\\krbtgt", r.out.info->dns.name.string); + tnames.names[5].name.string = talloc_asprintf(tctx, "%s\\krbtgt", info->dns.name.string); tnames.names[5].sid_type = SID_NAME_USER; - tnames.names[6].name.string = talloc_asprintf(tctx, "%s\\guest", r.out.info->dns.dns_domain.string); + tnames.names[6].name.string = talloc_asprintf(tctx, "%s\\guest", info->dns.dns_domain.string); tnames.names[6].sid_type = SID_NAME_USER; - tnames.names[7].name.string = talloc_asprintf(tctx, "%s\\krbtgt", r.out.info->dns.dns_domain.string); + tnames.names[7].name.string = talloc_asprintf(tctx, "%s\\krbtgt", info->dns.dns_domain.string); tnames.names[7].sid_type = SID_NAME_USER; - tnames.names[8].name.string = talloc_asprintf(tctx, "krbtgt@%s", r.out.info->dns.name.string); + tnames.names[8].name.string = talloc_asprintf(tctx, "krbtgt@%s", info->dns.name.string); tnames.names[8].sid_type = SID_NAME_USER; - tnames.names[9].name.string = talloc_asprintf(tctx, "krbtgt@%s", r.out.info->dns.dns_domain.string); + tnames.names[9].name.string = talloc_asprintf(tctx, "krbtgt@%s", info->dns.dns_domain.string); tnames.names[9].sid_type = SID_NAME_USER; - tnames.names[10].name.string = talloc_asprintf(tctx, "%s\\"TEST_MACHINENAME "$", r.out.info->dns.name.string); + tnames.names[10].name.string = talloc_asprintf(tctx, "%s\\"TEST_MACHINENAME "$", info->dns.name.string); tnames.names[10].sid_type = SID_NAME_USER; - tnames.names[11].name.string = talloc_asprintf(tctx, "%s\\"TEST_MACHINENAME "$", r.out.info->dns.dns_domain.string); + tnames.names[11].name.string = talloc_asprintf(tctx, "%s\\"TEST_MACHINENAME "$", info->dns.dns_domain.string); tnames.names[11].sid_type = SID_NAME_USER; - tnames.names[12].name.string = talloc_asprintf(tctx, TEST_MACHINENAME "$@%s", r.out.info->dns.name.string); + tnames.names[12].name.string = talloc_asprintf(tctx, TEST_MACHINENAME "$@%s", info->dns.name.string); tnames.names[12].sid_type = SID_NAME_USER; - tnames.names[13].name.string = talloc_asprintf(tctx, TEST_MACHINENAME "$@%s", r.out.info->dns.dns_domain.string); + tnames.names[13].name.string = talloc_asprintf(tctx, TEST_MACHINENAME "$@%s", info->dns.dns_domain.string); tnames.names[13].sid_type = SID_NAME_USER; ret &= test_LookupNames(p, tctx, handle, &tnames); diff --git a/source4/torture/rpc/lsa_lookup.c b/source4/torture/rpc/lsa_lookup.c index beb299b597..0124ce1741 100644 --- a/source4/torture/rpc/lsa_lookup.c +++ b/source4/torture/rpc/lsa_lookup.c @@ -66,15 +66,17 @@ static bool get_domainsid(TALLOC_CTX *mem_ctx, struct dcerpc_pipe *p, struct dom_sid **sid) { struct lsa_QueryInfoPolicy r; + union lsa_PolicyInformation *info = NULL; NTSTATUS status; r.in.level = LSA_POLICY_INFO_DOMAIN; r.in.handle = handle; + r.out.info = &info; status = dcerpc_lsa_QueryInfoPolicy(p, mem_ctx, &r); if (!NT_STATUS_IS_OK(status)) return false; - *sid = r.out.info->domain.sid; + *sid = info->domain.sid; return true; } diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c index dc904fccf1..a45397de46 100644 --- a/source4/torture/rpc/samba3rpc.c +++ b/source4/torture/rpc/samba3rpc.c @@ -208,6 +208,7 @@ static bool bindtest(struct smbcli_state *cli, struct lsa_ObjectAttribute objectattr; struct lsa_OpenPolicy2 openpolicy; struct lsa_QueryInfoPolicy query; + union lsa_PolicyInformation *info = NULL; struct policy_handle handle; struct lsa_Close close_handle; @@ -256,6 +257,7 @@ static bool bindtest(struct smbcli_state *cli, query.in.handle = &handle; query.in.level = LSA_POLICY_INFO_DOMAIN; + query.out.info = &info; status = dcerpc_lsa_QueryInfoPolicy(lsa_pipe, mem_ctx, &query); if (!NT_STATUS_IS_OK(status)) { @@ -2393,8 +2395,10 @@ bool torture_samba3_rpc_lsa(struct torture_context *torture) for (i=0; i<ARRAY_SIZE(levels); i++) { struct lsa_QueryInfoPolicy r; + union lsa_PolicyInformation *info = NULL; r.in.handle = &lsa_handle; r.in.level = levels[i]; + r.out.info = &info; status = dcerpc_lsa_QueryInfoPolicy(p, mem_ctx, &r); if (!NT_STATUS_IS_OK(status)) { d_printf("(%s) dcerpc_lsa_QueryInfoPolicy %d " @@ -2404,7 +2408,7 @@ bool torture_samba3_rpc_lsa(struct torture_context *torture) return false; } if (levels[i] == 5) { - domain_sid = r.out.info->account_domain.sid; + domain_sid = info->account_domain.sid; } } } |