-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lib/repo: Fix multi-signature support when generating summary files #1489
Conversation
Can one of the admins verify this patch?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the contribution! Just one comment below, though it's not a new issue so I can take care of it if you prefer.
src/libostree/ostree-repo.c
Outdated
@@ -4830,10 +4829,10 @@ ostree_repo_add_gpg_signature_summary (OstreeRepo *self, | |||
cancellable, error)) | |||
return FALSE; | |||
|
|||
new_metadata = _ostree_detached_metadata_append_gpg_sig (existing_signatures, signature_data); | |||
metadata = _ostree_detached_metadata_append_gpg_sig (metadata, signature_data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One subtle issue here is that we're leaking the previous value of metadata
. Let's tweak it to something like this instead:
g_autoptr(GVariant) old_metadata = g_steal_pointer (&metadata);
metadata = _ostree_detached_metadata_append_gpg_sig (old_metadata, signature_data);
?
Ensure that the metadata object is built up with the signatures from all keys passed to ostree_repo_add_gpg_signature_summary(). Previously only the signature from the last key would end up in the metadata. Closes: ostreedev#1488
52a38f4
to
5d49262
Compare
Hi @jlebon thanks for your feedback. I made the change as you described. Can you please take another look? |
Thanks for the patch! |
☀️ Test successful - status-atomicjenkins |
Ensure that the metadata object is built up with the signatures from all keys
passed to ostree_repo_add_gpg_signature_summary(). Previously only the signature
from the last key would end up in the metadata.
Closes: #1488