return NT_STATUS_OK;
}
+NTSTATUS trust_forest_info_lsa_1to2(TALLOC_CTX *mem_ctx,
+ const struct lsa_ForestTrustInformation *lfti,
+ struct lsa_ForestTrustInformation2 **_lfti2)
+{
+ TALLOC_CTX *frame = talloc_stackframe();
+ struct ForestTrustInfo *fti = NULL;
+ struct lsa_ForestTrustInformation2 *lfti2 = NULL;
+ NTSTATUS status;
+
+ status = trust_forest_info_from_lsa(frame, lfti, &fti);
+ if (!NT_STATUS_IS_OK(status)) {
+ TALLOC_FREE(frame);
+ return status;
+ }
+
+ status = trust_forest_info_to_lsa2(mem_ctx,
+ fti,
+ &lfti2);
+ if (!NT_STATUS_IS_OK(status)) {
+ TALLOC_FREE(frame);
+ return status;
+ }
+
+ *_lfti2 = lfti2;
+ TALLOC_FREE(frame);
+ return NT_STATUS_OK;
+}
+
+NTSTATUS trust_forest_info_lsa_2to1(TALLOC_CTX *mem_ctx,
+ const struct lsa_ForestTrustInformation2 *lfti2,
+ struct lsa_ForestTrustInformation **_lfti)
+{
+ TALLOC_CTX *frame = talloc_stackframe();
+ struct ForestTrustInfo *fti = NULL;
+ struct lsa_ForestTrustInformation *lfti = NULL;
+ NTSTATUS status;
+
+ status = trust_forest_info_from_lsa2(frame, lfti2, &fti);
+ if (!NT_STATUS_IS_OK(status)) {
+ TALLOC_FREE(frame);
+ return status;
+ }
+
+ status = trust_forest_info_to_lsa(mem_ctx,
+ fti,
+ &lfti);
+ if (!NT_STATUS_IS_OK(status)) {
+ TALLOC_FREE(frame);
+ return status;
+ }
+
+ *_lfti = lfti;
+ TALLOC_FREE(frame);
+ return NT_STATUS_OK;
+}
+
static int trust_forest_info_tln_match_internal(
const struct lsa_ForestTrustInformation *info,
enum lsa_ForestTrustRecordType type,
NTSTATUS trust_forest_info_to_lsa2(TALLOC_CTX *mem_ctx,
const struct ForestTrustInfo *fti,
struct lsa_ForestTrustInformation2 **_lfti);
+NTSTATUS trust_forest_info_lsa_1to2(TALLOC_CTX *mem_ctx,
+ const struct lsa_ForestTrustInformation *lfti,
+ struct lsa_ForestTrustInformation2 **_lfti2);
+NTSTATUS trust_forest_info_lsa_2to1(TALLOC_CTX *mem_ctx,
+ const struct lsa_ForestTrustInformation2 *lfti2,
+ struct lsa_ForestTrustInformation **_lfti);
bool trust_forest_info_tln_match(
const struct lsa_ForestTrustInformation *info,