-
Notifications
You must be signed in to change notification settings - Fork 114
Use a native library for SELinux in wwclient #2042
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR replaces shell command dependencies with a native Go library for SELinux operations in wwclient, improving reliability and reducing external dependencies.
Key changes:
- Replace custom SELinux detection with
github.com/opencontainers/selinuxlibrary - Eliminate shell commands (
matchpathcon,restorecon,chcon) in favor of native Go API calls - Improve SELinux context handling logic with better fallback mechanisms
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| internal/app/wwclient/root.go | Replace shell-based SELinux operations with native library calls and improved context handling logic |
| go.mod | Add opencontainers/selinux v1.11.1 dependency |
| CHANGELOG.md | Document the SELinux implementation change |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
I'll resolve the conflict and address the Copilot comments. |
0817842 to
c3356e4
Compare
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.
Pull Request Overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This removes the dependency on shelling out to commands in the image. Signed-off-by: Jonathon Anderson <[email protected]>
c3356e4 to
30c9b7a
Compare
|
@anderbubble is this obsoleted by #2055? |
|
@middelkoopt this is not obsoleted by #2055, but is work that I discovered in parallel with that. I think it should still be applied. |
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.
PR and approach looks good. Lightly tested on my test cluster.
Description of the Pull Request (PR):
This removes the dependency on shelling out to commands in the image.
Done on the side while working on #1997.
Reviewer checklist
The reviewer checks the following items before merging the PR.
git commit --signoff) in agreement to the DCO