}
if (trust_attributes & LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE) {
- struct lsa_ForestTrustInformation *old_fti = NULL;
+ struct lsa_ForestTrustInformation2 *old_fti = NULL;
- status = dcerpc_lsa_lsaRQueryForestTrustInformation(local_lsa, frame,
+ status = dcerpc_lsa_lsaRQueryForestTrustInformation2(local_lsa, frame,
&local_lsa_policy,
&trusted_domain_name,
- LSA_FOREST_TRUST_DOMAIN_INFO,
+ LSA_FOREST_TRUST_SCANNER_INFO,
&old_fti, &result);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0,("%s:%s: local_lsa.lsaRQueryForestTrustInformation(%s) failed %s\n",
+ DEBUG(0,("%s:%s: local_lsa.lsaRQueryForestTrustInformation2(%s) failed %s\n",
__location__, __func__, domain->name, nt_errstr(status)));
TALLOC_FREE(frame);
return WERR_INTERNAL_ERROR;
if (new_fti != NULL) {
struct lsa_ForestTrustInformation2 old_fti = {};
struct lsa_ForestTrustInformation2 *new_fti2 = NULL;
- struct lsa_ForestTrustInformation2 *merged_fti2 = NULL;
- struct lsa_ForestTrustInformation *merged_fti = NULL;
+ struct lsa_ForestTrustInformation2 *merged_fti = NULL;
struct lsa_ForestTrustCollisionInfo *collision_info = NULL;
status = trust_forest_info_lsa_1to2(frame,
local_tdo,
&old_fti,
new_fti2,
- &merged_fti2);
+ &merged_fti);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("%s:%s: dsdb_trust_merge_forest_info(%s) failed %s\n",
__location__, __func__,
return ntstatus_to_werror(status);
}
- status = trust_forest_info_lsa_2to1(frame,
- merged_fti2,
- &merged_fti);
- if (!NT_STATUS_IS_OK(status)) {
- TALLOC_FREE(frame);
- return ntstatus_to_werror(status);
- }
-
- status = dcerpc_lsa_lsaRSetForestTrustInformation(local_lsa, frame,
+ status = dcerpc_lsa_lsaRSetForestTrustInformation2(local_lsa, frame,
&local_lsa_policy,
&trusted_domain_name_l,
- LSA_FOREST_TRUST_DOMAIN_INFO,
+ LSA_FOREST_TRUST_SCANNER_INFO,
merged_fti,
0, /* check_only=0 => store it! */
&collision_info,
struct lsa_StringLarge trusted_domain_name_l = {};
union lsa_TrustedDomainInfo *tdi = NULL;
const struct lsa_TrustDomainInfoInfoEx *tdo = NULL;
- struct lsa_ForestTrustInformation _old_fti = {};
- struct lsa_ForestTrustInformation *old_fti = NULL;
+ struct lsa_ForestTrustInformation2 _old_fti = {};
+ struct lsa_ForestTrustInformation2 *old_fti = NULL;
struct lsa_ForestTrustInformation *new_fti = NULL;
- struct lsa_ForestTrustInformation *merged_fti = NULL;
- struct lsa_ForestTrustInformation2 *old_fti2 = NULL;
struct lsa_ForestTrustInformation2 *new_fti2 = NULL;
- struct lsa_ForestTrustInformation2 *merged_fti2 = NULL;
+ struct lsa_ForestTrustInformation2 *merged_fti = NULL;
struct lsa_ForestTrustCollisionInfo *collision_info = NULL;
bool update_fti = false;
struct rpc_pipe_client *local_lsa_pipe;
update_fti = true;
}
- status = dcerpc_lsa_lsaRQueryForestTrustInformation(local_lsa, frame,
+ status = dcerpc_lsa_lsaRQueryForestTrustInformation2(local_lsa, frame,
&local_lsa_policy,
&trusted_domain_name,
- LSA_FOREST_TRUST_DOMAIN_INFO,
+ LSA_FOREST_TRUST_SCANNER_INFO,
&old_fti, &result);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0,("%s:%s: local_lsa.lsaRQueryForestTrustInformation(%s) failed %s\n",
+ DEBUG(0,("%s:%s: local_lsa.lsaRQueryForestTrustInformation2(%s) failed %s\n",
__location__, __func__, domain->name, nt_errstr(status)));
TALLOC_FREE(frame);
return WERR_INTERNAL_ERROR;
goto done;
}
- status = trust_forest_info_lsa_1to2(frame,
- old_fti,
- &old_fti2);
- if (!NT_STATUS_IS_OK(status)) {
- TALLOC_FREE(frame);
- return ntstatus_to_werror(status);
- }
status = trust_forest_info_lsa_1to2(frame,
new_fti,
&new_fti2);
status = dsdb_trust_merge_forest_info(frame,
tdo,
- old_fti2,
+ old_fti,
new_fti2,
- &merged_fti2);
+ &merged_fti);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("%s:%s: dsdb_trust_merge_forest_info(%s) failed %s\n",
__location__, __func__, domain->name, nt_errstr(status)));
return ntstatus_to_werror(status);
}
- status = trust_forest_info_lsa_2to1(frame,
- merged_fti2,
- &merged_fti);
- if (!NT_STATUS_IS_OK(status)) {
- TALLOC_FREE(frame);
- return ntstatus_to_werror(status);
- }
-
- status = dcerpc_lsa_lsaRSetForestTrustInformation(local_lsa, frame,
+ status = dcerpc_lsa_lsaRSetForestTrustInformation2(local_lsa, frame,
&local_lsa_policy,
&trusted_domain_name_l,
- LSA_FOREST_TRUST_DOMAIN_INFO,
+ LSA_FOREST_TRUST_SCANNER_INFO,
merged_fti,
0, /* check_only=0 => store it! */
&collision_info,