-
Notifications
You must be signed in to change notification settings - Fork 50
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
fix ownership of containerd/docker sysext files #2266
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The docker and containerd copy files from the repository, which are owned by the sdk user. This ownership leaks into the final image, which means the first created user could edit systemd files. This is bad. Modify the cp invocation to copy files without preserving ownership. The sysext-mangle script is called by build_sysext, which is executed using sudo. Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
chewi
approved these changes
Aug 30, 2024
Build action triggered: https://github.com/flatcar/scripts/actions/runs/10664680809 |
jepio
added a commit
that referenced
this pull request
Sep 2, 2024
fix ownership of containerd/docker sysext files Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
jepio
added a commit
that referenced
this pull request
Sep 2, 2024
fix ownership of containerd/docker sysext files Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
jepio
added a commit
that referenced
this pull request
Sep 2, 2024
fix ownership of containerd/docker sysext files Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
Cherry-picked to stable/beta/alpha, lts doesn't have sysext docker/containerd yet.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix ownership of containerd/docker sysext files
Systemd units shipped with the sysext were accidentally owned by the sdk user because we were telling
cp
to preserve ownership, and the files come from the cloned repo which is owned by the sdk user. Fix thecp
invocation and add a check for wrong files before the sysext is created.See: flatcar/Flatcar#1525
How to use
[ describe what reviewers need to do in order to validate this PR ]
Testing done
[Describe the testing you have done before submitting this PR. Please include both the commands you issued as well as the output you got.]
changelog/
directory (user-facing change, bug fix, security fix, update)/boot
and/usr
size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.