Skip to content

Commit

Permalink
fixup! lib/repo-pull: Allow the keyring remote to be overridden
Browse files Browse the repository at this point in the history
  • Loading branch information
mwleeds committed Feb 20, 2019
1 parent eee6625 commit f4cd5ac
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/libostree/ostree-repo-pull.c
Original file line number Diff line number Diff line change
Expand Up @@ -1483,7 +1483,7 @@ gpg_verify_unwritten_commit (OtPullData *pull_data,
if (ref != NULL)
keyring_remote = g_hash_table_lookup (pull_data->ref_keyring_map, ref);
if (keyring_remote == NULL)
keyring_remote = pull_data->remote_name;
keyring_remote = pull_data->remote_name;

g_autoptr(GBytes) signed_data = g_variant_get_data_as_bytes (commit);
g_autoptr(OstreeGpgVerifyResult) result =
Expand Down Expand Up @@ -1804,7 +1804,7 @@ scan_commit_object (OtPullData *pull_data,
if (ref != NULL)
keyring_remote = g_hash_table_lookup (pull_data->ref_keyring_map, ref);
if (keyring_remote == NULL)
keyring_remote = pull_data->remote_name;
keyring_remote = pull_data->remote_name;

result = ostree_repo_verify_commit_for_remote (pull_data->repo,
checksum,
Expand Down Expand Up @@ -4412,8 +4412,12 @@ ostree_repo_pull_with_options (OstreeRepo *self,
{
g_autoptr(OstreeCollectionRef) c_r = NULL;

if (!ostree_validate_collection_id (collection_id, error))
goto out;
if (!ostree_validate_rev (ref_name, error))
goto out;
if (!ostree_validate_remote_name (keyring_remote_name, error))
goto out;

c_r = ostree_collection_ref_new (collection_id, ref_name);
if (!g_hash_table_contains (requested_refs_to_fetch, c_r))
Expand Down

0 comments on commit f4cd5ac

Please sign in to comment.