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

[3006.x] Allow for semange fcontext -l having trailing whitespace in selinux.fcontext_get_policy #64950

Merged
merged 1 commit into from
Aug 10, 2023

Conversation

dmurphy18
Copy link
Contributor

What does this PR do?

Removes any trailing whitespace returned from semanage fcontext -l on platforms supporting selinux.
This was leading to erroneous returns when checked if a specific file context exists.

What issues does this PR fix or reference?

Fixes: #63336

Previous Behavior

If there were trailing whitespaces in the output of semanage fcontext -l, the function selinux.fcontext_get_policy would return no result even though there is one.

New Behavior

Now the function selinux.fcontext_get_policy will return the result even if there is a trailing whitespace.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

@dmurphy18 dmurphy18 added this to the Sulfur v3006.3 milestone Aug 9, 2023
@dmurphy18 dmurphy18 requested a review from a team as a code owner August 9, 2023 20:23
@dmurphy18 dmurphy18 requested review from MKLeb and removed request for a team August 9, 2023 20:23
@salt-project-bot-prod-environment salt-project-bot-prod-environment bot changed the title Allow for semange fcontext -l having trailing whitespace in selinux.fcontext_get_policy [3006.x] Allow for semange fcontext -l having trailing whitespace in selinux.fcontext_get_policy Aug 9, 2023
@dmurphy18
Copy link
Contributor Author

This PR supersedes PR #63337

@dmurphy18 dmurphy18 temporarily deployed to ci August 9, 2023 20:41 — with GitHub Actions Inactive
@dmurphy18 dmurphy18 temporarily deployed to ci August 9, 2023 20:42 — with GitHub Actions Inactive
@dmurphy18 dmurphy18 temporarily deployed to ci August 9, 2023 20:42 — with GitHub Actions Inactive
@dmurphy18 dmurphy18 temporarily deployed to ci August 9, 2023 20:57 — with GitHub Actions Inactive
@dmurphy18 dmurphy18 temporarily deployed to ci August 9, 2023 20:58 — with GitHub Actions Inactive
@dmurphy18 dmurphy18 temporarily deployed to ci August 9, 2023 20:58 — with GitHub Actions Inactive
@dmurphy18 dmurphy18 temporarily deployed to ci August 9, 2023 22:23 — with GitHub Actions Inactive
@dmurphy18 dmurphy18 temporarily deployed to ci August 9, 2023 22:23 — with GitHub Actions Inactive
@dmurphy18 dmurphy18 temporarily deployed to ci August 9, 2023 22:23 — with GitHub Actions Inactive
@dmurphy18 dmurphy18 temporarily deployed to ci August 9, 2023 22:23 — with GitHub Actions Inactive
@dmurphy18 dmurphy18 temporarily deployed to ci August 9, 2023 22:23 — with GitHub Actions Inactive
@dmurphy18 dmurphy18 temporarily deployed to ci August 9, 2023 22:23 — with GitHub Actions Inactive
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