Skip to content

Commit

Permalink
manually copy every field instead of copying everything
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 committed Sep 5, 2024
1 parent 3281f86 commit a8d3028
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions source/credentials_provider_profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,14 @@ static struct aws_credentials_provider *s_create_sts_based_provider(
"static: source_profile set to %s",
aws_string_c_str(aws_profile_property_get_value(source_profile_property)));

struct aws_credentials_provider_profile_options profile_provider_options = *options;
profile_provider_options.profile_name_override =
aws_byte_cursor_from_string(aws_profile_property_get_value(source_profile_property));
/* reuse profile collection instead of reading it again */
profile_provider_options.profile_collection_cached = merged_profiles;
struct aws_credentials_provider_profile_options profile_provider_options = {
.bootstrap = options->bootstrap,
.profile_name_override = aws_byte_cursor_from_string(aws_profile_property_get_value(source_profile_property)),
/* reuse profile collection instead of reading it again */
.profile_collection_cached = merged_profiles,
.tls_ctx = options->tls_ctx,
.function_table = options->function_table,
};
sts_options.creds_provider =
s_credentials_provider_new_profile_internal(allocator, &profile_provider_options, source_profiles_table);

Expand Down

0 comments on commit a8d3028

Please sign in to comment.