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

ENT-11136: Refactor and improve policy fixing up SELinux context on FR SSH files (3.21) #2890

Conversation

nickanderson
Copy link
Member

We need to make sure both semanage fcontext -a and restorecon
are done before we run ssh-keygen. Otherwise ssh-keygen may
be blocked by SELinux when trying to save/write the generated
key at first and only succeeds in a later agent run.

Ticket: ENT-11136
Changelog: Federated reporting policy fixes SELinux context of
the ~cftransport/.ssh directory and its contents in a
single agent run.
(cherry picked from commit ff392a9)

We need to make sure both `semanage fcontext -a` and `restorecon`
are done before we run `ssh-keygen`. Otherwise `ssh-keygen` may
be blocked by SELinux when trying to save/write the generated
key at first and only succeeds in a later agent run.

Ticket: ENT-11136
Changelog: Federated reporting policy fixes SELinux context of
           the ~cftransport/.ssh directory and its contents in a
           single agent run.
(cherry picked from commit ff392a9)
@nickanderson
Copy link
Member Author

For #2817

@nickanderson nickanderson requested review from vpodzime and craigcomstock and removed request for vpodzime May 24, 2024 17:42
@nickanderson
Copy link
Member Author

@cf-bottom jenkins, please

@cf-bottom
Copy link

Copy link
Contributor

@vpodzime vpodzime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still like this change 😁

Copy link
Contributor

@craigcomstock craigcomstock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks ok, please test :)

@olehermanse olehermanse merged commit 60eae14 into cfengine:3.21.x May 29, 2024
37 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants