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

Improve security_opt comparison between existing containers #673

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

rebtoor
Copy link
Contributor

@rebtoor rebtoor commented Nov 27, 2023

Since SElinux labels are basically annotations[1], they are merged in a single comma separated string in the list by podman, so we need to split them in a sorted list if we want to compare it to the list that we provide to the module.

Also, a proper test for this case has been added.

[1] https://github.com/containers/podman/blob/d1236f46fc5cb29e8da296c3662f8ce869865030/libpod/define/annotations.go#L49-L54

Since SElinux labels are basically annotations, they are merged in a single comma separated string in the list by podman, so we need to split them in a sorted list if we want to compare it to the list that we provide to the module.

Also, a proper test of this example has been added.

Signed-off-by: Roberto Alfieri <[email protected]>
@sshnaidm
Copy link
Member

Great! Thanks for contribution!

@sshnaidm sshnaidm merged commit 6c87654 into containers:master Nov 28, 2023
21 checks passed
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.

2 participants