mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
s4-lsa: merge lsa_QueryTrustedDomainInfoBySid from s3 lsa idl.
Guenther
This commit is contained in:
parent
8bcc939a8c
commit
7c3d1dd8a9
@ -835,9 +835,9 @@ import "misc.idl", "security.idl";
|
|||||||
/* Function: 0x27 */
|
/* Function: 0x27 */
|
||||||
NTSTATUS lsa_QueryTrustedDomainInfoBySid(
|
NTSTATUS lsa_QueryTrustedDomainInfoBySid(
|
||||||
[in] policy_handle *handle,
|
[in] policy_handle *handle,
|
||||||
[in] dom_sid2 *dom_sid,
|
[in,ref] dom_sid2 *dom_sid,
|
||||||
[in] lsa_TrustDomInfoEnum level,
|
[in] lsa_TrustDomInfoEnum level,
|
||||||
[out,switch_is(level),unique] lsa_TrustedDomainInfo *info
|
[out,switch_is(level),ref] lsa_TrustedDomainInfo **info
|
||||||
);
|
);
|
||||||
|
|
||||||
/* Function: 0x28 */
|
/* Function: 0x28 */
|
||||||
|
@ -1426,12 +1426,12 @@ static NTSTATUS dcesrv_lsa_QueryTrustedDomainInfoBySid(struct dcesrv_call_state
|
|||||||
|
|
||||||
query.in.trustdom_handle = open.out.trustdom_handle;
|
query.in.trustdom_handle = open.out.trustdom_handle;
|
||||||
query.in.level = r->in.level;
|
query.in.level = r->in.level;
|
||||||
|
query.out.info = r->out.info;
|
||||||
status = dcesrv_lsa_QueryTrustedDomainInfo(dce_call, mem_ctx, &query);
|
status = dcesrv_lsa_QueryTrustedDomainInfo(dce_call, mem_ctx, &query);
|
||||||
if (!NT_STATUS_IS_OK(status)) {
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
r->out.info = query.out.info;
|
|
||||||
return NT_STATUS_OK;
|
return NT_STATUS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1838,7 +1838,7 @@ static bool test_query_each_TrustDom(struct dcerpc_pipe *p,
|
|||||||
|
|
||||||
for (j=0; j < ARRAY_SIZE(levels); j++) {
|
for (j=0; j < ARRAY_SIZE(levels); j++) {
|
||||||
struct lsa_QueryTrustedDomainInfoBySid q;
|
struct lsa_QueryTrustedDomainInfoBySid q;
|
||||||
union lsa_TrustedDomainInfo info;
|
union lsa_TrustedDomainInfo *info = NULL;
|
||||||
|
|
||||||
if (!domains->domains[i].sid) {
|
if (!domains->domains[i].sid) {
|
||||||
continue;
|
continue;
|
||||||
@ -1848,6 +1848,7 @@ static bool test_query_each_TrustDom(struct dcerpc_pipe *p,
|
|||||||
q.in.dom_sid = domains->domains[i].sid;
|
q.in.dom_sid = domains->domains[i].sid;
|
||||||
q.in.level = levels[j];
|
q.in.level = levels[j];
|
||||||
q.out.info = &info;
|
q.out.info = &info;
|
||||||
|
|
||||||
status = dcerpc_lsa_QueryTrustedDomainInfoBySid(p, mem_ctx, &q);
|
status = dcerpc_lsa_QueryTrustedDomainInfoBySid(p, mem_ctx, &q);
|
||||||
if (!NT_STATUS_IS_OK(status) && ok[j]) {
|
if (!NT_STATUS_IS_OK(status) && ok[j]) {
|
||||||
printf("QueryTrustedDomainInfoBySid level %d failed - %s\n",
|
printf("QueryTrustedDomainInfoBySid level %d failed - %s\n",
|
||||||
|
@ -192,6 +192,7 @@ static bool get_downleveltrust(struct torture_context *tctx, struct dcerpc_pipe
|
|||||||
|
|
||||||
for (i=0; i<domains.count; i++) {
|
for (i=0; i<domains.count; i++) {
|
||||||
struct lsa_QueryTrustedDomainInfoBySid q;
|
struct lsa_QueryTrustedDomainInfoBySid q;
|
||||||
|
union lsa_TrustedDomainInfo *info = NULL;
|
||||||
|
|
||||||
if (domains.domains[i].sid == NULL)
|
if (domains.domains[i].sid == NULL)
|
||||||
continue;
|
continue;
|
||||||
@ -199,11 +200,13 @@ static bool get_downleveltrust(struct torture_context *tctx, struct dcerpc_pipe
|
|||||||
q.in.handle = handle;
|
q.in.handle = handle;
|
||||||
q.in.dom_sid = domains.domains[i].sid;
|
q.in.dom_sid = domains.domains[i].sid;
|
||||||
q.in.level = 6;
|
q.in.level = 6;
|
||||||
|
q.out.info = &info;
|
||||||
|
|
||||||
status = dcerpc_lsa_QueryTrustedDomainInfoBySid(p, tctx, &q);
|
status = dcerpc_lsa_QueryTrustedDomainInfoBySid(p, tctx, &q);
|
||||||
if (!NT_STATUS_IS_OK(status)) continue;
|
if (!NT_STATUS_IS_OK(status)) continue;
|
||||||
|
|
||||||
if ((q.out.info->info_ex.trust_direction & 2) &&
|
if ((info->info_ex.trust_direction & 2) &&
|
||||||
(q.out.info->info_ex.trust_type == 1)) {
|
(info->info_ex.trust_type == 1)) {
|
||||||
*sid = domains.domains[i].sid;
|
*sid = domains.domains[i].sid;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user