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

Fixing change-selinux-status-to-disabled exec #246

Merged
merged 1 commit into from
Jan 4, 2018

Conversation

bjvrielink
Copy link
Contributor

setenforce only accepts enforcing or permissive (or 0 and 1) as possible modes.
When calling the selinux module with the current mode as either enforcing or permissive and $mode => disabled, the exec change-selinux-status-to-disabled will give exit code 1. A reboot does solve this, but until that happens. each puppet run will result in a report with a corrective change.

@bjvrielink
Copy link
Contributor Author

I have unfortunately no idea why the checks fail. Why can't Travis load bundle?

@vinzent
Copy link
Contributor

vinzent commented Dec 22, 2017

@bjvrielink i'llr rerun the travis jobs

@bastelfreak
Copy link
Member

I'm currently doing a modulesync, this will hopefully fix the travis issues.

@bastelfreak bastelfreak mentioned this pull request Jan 4, 2018
@bastelfreak
Copy link
Member

@bjvrielink can you rebase please?

@bjvrielink
Copy link
Contributor Author

Rebased. I'm new to Travis, so no idea why it is taking so long...

setenforce only accepts enforcing or permissive (or 0 and 1) as possible modes.
When calling the selinux module with the current mode as either enforcing or permissive and $mode => disabled, the exec change-selinux-status-to-disabled will give exit code 1. A reboot does solve this, but until that happens. each puppet run will result in a report with a corrective change.
@ekohl
Copy link
Member

ekohl commented Jan 4, 2018

Travis limits on the number of jobs. It's queued though so we'll just have to be patient.

@bastelfreak bastelfreak added the bug Something isn't working label Jan 4, 2018
@bastelfreak bastelfreak merged commit 79ae6e4 into voxpupuli:master Jan 4, 2018
weaselshit pushed a commit to weaselshit/puppet-selinux that referenced this pull request Jan 11, 2018
The voxpupuli#245 issue was addressed by voxpupuli#246, but that introduced a new problem:
when mode param is set to 'disabled', runtime mode never gets changed to
'permissive' anymore.

The original problem was different: it was not wrong parameter to
setenforce, instead, the unless command was wrong, always grepping for
'disabled|disabled'.

This change uses literal modes instead of numeric for both exec *and*
unless command and removes conditinal statement added in voxpupuli#246 to restore
original behaviour. It also adds tests for unless param of the exec in
question.
weaselshit added a commit to weaselshit/puppet-selinux that referenced this pull request Jan 11, 2018
The voxpupuli#245 issue was addressed by voxpupuli#246, but that introduced a new problem:
when mode param is set to 'disabled', runtime mode never gets changed to
'permissive' anymore.

The original problem was different: it was not wrong parameter to
setenforce, instead, the unless command was wrong, always grepping for
'disabled|disabled'.

This change uses literal modes instead of numeric for both exec *and*
unless command and removes conditinal statement added in voxpupuli#246 to restore
original behaviour. It also adds tests for unless param of the exec in
question.
EmRowlands pushed a commit to EmRowlands/puppet-selinux that referenced this pull request Mar 29, 2023
Fixing change-selinux-status-to-disabled exec
EmRowlands pushed a commit to EmRowlands/puppet-selinux that referenced this pull request Mar 29, 2023
The voxpupuli#245 issue was addressed by voxpupuli#246, but that introduced a new problem:
when mode param is set to 'disabled', runtime mode never gets changed to
'permissive' anymore.

The original problem was different: it was not wrong parameter to
setenforce, instead, the unless command was wrong, always grepping for
'disabled|disabled'.

This change uses literal modes instead of numeric for both exec *and*
unless command and removes conditinal statement added in voxpupuli#246 to restore
original behaviour. It also adds tests for unless param of the exec in
question.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants