Skip to content
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

pkg/oci: make fixMetadataOwner more generic #2641

Merged
merged 1 commit into from
Mar 25, 2024
Merged

Conversation

alban
Copy link
Member

@alban alban commented Mar 25, 2024

fixMetadataOwner() was previously added for the following reason:

'ig image build --update-metadata' overwrites gadget.yaml but since ig runs as root, the file gadget.yaml initially ends up belonging to root. The function fixMetadataOwner() fixes this with a chown.

In order to reuse fixMetadataOwner() for a different file, this patch makes it more generic.

This commit was initially part of #2586.

fixMetadataOwner() was previously added for the following reason:

'ig image build --update-metadata' overwrites gadget.yaml but since ig
runs as root, the file gadget.yaml initially ends up belonging to root.
The function fixMetadataOwner() fixes this with a chown.

In order to reuse fixMetadataOwner() for a different file, this patch
makes it more generic.

Signed-off-by: Alban Crequy <albancrequy@linux.microsoft.com>
@alban alban merged commit 92c3134 into main Mar 25, 2024
59 checks passed
@alban alban deleted the alban_fix_ownership branch March 25, 2024 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants