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

Switch default behavior to not manage selinux #67

Merged
merged 5 commits into from
Nov 4, 2015

Conversation

purplexa
Copy link
Contributor

@purplexa purplexa commented Nov 4, 2015

This changes the default behavior for the module to not modify selinux settings unless explicitly told to. This is the desired behavior as described in #64, because otherwise using one of the defined types to manage just a specific selinux rule, but not manually declaring the selinux class and setting the mode explicitly causes selinux to be disabled. It is confusing (and undocumented) to use a defined type in a
module called selinux to set an selinux rule, and have that result in selinux getting disabled.

This changes the default behavior, but it will not change the configuration of a node in the situation where the node had the class applied already. However, it will change the behavior in the situation
where the selinux class was not included on a node, and then was switched to being included on the node without any parameters set (included the situation of a node newly added to Puppet).

Ryan Whitehurst added 5 commits November 3, 2015 17:30
This renames the `spec/classes/selinux_config_mode.rb` file to the
proper `spec/classes/selinux_config_mode_spec.rb` because otherwise it
never gets run.
These test the behavior when setting `undef` for the `mode` parameter to
the base `selinux` class. The tested behavior is that the module does
not manage the selinux settings at all, leaving the current state the
same.

This is the desired behavior as described in voxpupuli#64, because otherwise
using one of the defined types to manage just a specific selinux rule,
but not manually declaring the `selinux` class and setting the mode
explicitly causes selinux to be disabled. It is confusing (and
undocumented) to use a defined type in a module called `selinux` to set
an selinux rule, and have that result in selinux getting disabled.
These test the behavior when setting `undef` for the `type` parameter to
the base `selinux` class. The tested behavior is that the module does
not manage the selinux settings at all, leaving the current state the
same.

This is the desired behavior as described in voxpupuli#64, because otherwise
using one of the defined types to manage just a specific selinux rule,
but not manually declaring the `selinux` class causes selinux
configuration to potentially change.
This changes the default behavior for the module to not modify selinux
settings unless explicitly told to. This is the desired behavior as
described in voxpupuli#64, because otherwise using one of the defined types to
manage just a specific selinux rule, but not manually declaring the
`selinux` class and setting the mode explicitly causes selinux to be
disabled. It is confusing (and undocumented) to use a defined type in a
module called `selinux` to set an selinux rule, and have that result in
selinux getting disabled.

This changes the default behavior, but it will not change the
configuration of a node in the situation where the node had the class
applied already. However, it will change the behavior in the situation
where the `selinux` class was not included on a node, and then was
switched to being included on the node without any parameters
set (included the situation of a node newly added to Puppet).
This updates the README with a few minor additions that weren't added,
as well as describing the default behavior.
@wouteroostervld
Copy link

Great!

@jfryman
Copy link
Contributor

jfryman commented Nov 4, 2015

Much obliged for the code! 🙇

jfryman added a commit that referenced this pull request Nov 4, 2015
Switch default behavior to not manage selinux
@jfryman jfryman merged commit 0cadea1 into voxpupuli:master Nov 4, 2015
@purplexa purplexa deleted the default_unmanaged branch November 4, 2015 20:11
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.

3 participants