Skip to content

Commit

Permalink
Trust type Crash fix
Browse files Browse the repository at this point in the history
  • Loading branch information
justin-stephenson committed Dec 5, 2024
1 parent 6c89f9e commit 816c4dd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/providers/ipa/ipa_subdomains_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -1332,6 +1332,11 @@ static errno_t ipa_server_create_trusts_ctx(struct tevent_req *req)

trust_type = state->domiter->forest_root->trust_type;

/* Previously stored AD trusted domains dont contain trust type attr */
if (trust_type != IPA_TRUST_AD && trust_type != IPA_TRUST_IPA) {
trust_type = IPA_TRUST_AD;
}

if (trust_type == IPA_TRUST_AD) {
ret = ipa_ad_ctx_new(state->be_ctx, state->id_ctx, state->domiter, &ad_id_ctx);
if (ret != EOK) {
Expand All @@ -1346,9 +1351,6 @@ static errno_t ipa_server_create_trusts_ctx(struct tevent_req *req)
"Cannot create ipa_id_ctx for subdomain %s\n", state->domiter->name);
return ret;
}
} else {
DEBUG(SSSDBG_OP_FAILURE, "Unknown trust type\n");
return ENOTSUP;
}

trust_ctx = talloc(state->id_ctx->server_mode, struct ipa_subdom_server_ctx);
Expand Down

0 comments on commit 816c4dd

Please sign in to comment.