1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-15 05:57:49 +03:00

dsdb:util_trusts: add dsdb_trust_local_tdo_info() helper function

This is similar to dsdb_trust_xref_tdo_info(), but will also work
if we ever support more than one domain in our forest.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11517

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit c1b0ac95db5c6112d90356c7ada8c3d445e9b668)
This commit is contained in:
Stefan Metzmacher 2018-02-01 23:09:26 +01:00
parent 96ae85bcc1
commit 66a055434f

View File

@ -828,6 +828,22 @@ static bool dsdb_trust_find_tln_ex_match(const struct lsa_ForestTrustInformation
return false;
}
NTSTATUS dsdb_trust_local_tdo_info(TALLOC_CTX *mem_ctx,
struct ldb_context *sam_ctx,
struct lsa_TrustDomainInfoInfoEx **_tdo)
{
struct ldb_dn *domain_dn = NULL;
domain_dn = ldb_get_default_basedn(sam_ctx);
if (domain_dn == NULL) {
return NT_STATUS_INTERNAL_ERROR;
}
return dsdb_trust_crossref_tdo_info(mem_ctx, sam_ctx,
domain_dn, NULL,
_tdo, NULL, NULL);
}
NTSTATUS dsdb_trust_xref_tdo_info(TALLOC_CTX *mem_ctx,
struct ldb_context *sam_ctx,
struct lsa_TrustDomainInfoInfoEx **_tdo)