-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added selinux class to disable selinux.
Sets permissive mode on the current environment. Manages /etc/selinux/config and disables it entirely. Signed-off-by: Jeff McCune <jeff@puppetlabs.com>
- Loading branch information
Jeff McCune
committed
Aug 7, 2010
1 parent
094b480
commit e2881bf
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include puppetlabs::selinux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Class: puppetlabs::selinux | ||
# | ||
# Disable SELinux | ||
# Jeff McCune <jeff@puppetlabs.com> | ||
# 2010-08-07 | ||
# | ||
# Parameters: | ||
# | ||
# Actions: | ||
# | ||
# Manages /etc/sysconfig/selinux | ||
# | ||
# Requires: | ||
# | ||
# Sample Usage: | ||
# | ||
# include puppetlabs::selinux | ||
# | ||
class puppetlabs::selinux { | ||
$module = "puppetlabs" | ||
$class = "${module}::selinux" | ||
File { owner => "0", group => "0", mode => "0644" } | ||
file { | ||
"/etc/selinux/config": | ||
content => template("${module}/etc/selinux/config"); | ||
} | ||
exec { | ||
"selinux": | ||
command => "/usr/sbin/setenforce 0", | ||
onlyif => "/bin/bash -c '/usr/sbin/getenforce | /bin/grep -qx Enforcing'" | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
suite/share/modules/puppetlabs/templates/etc/selinux/config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This file controls the state of SELinux on the system. | ||
# SELINUX= can take one of these three values: | ||
# enforcing - SELinux security policy is enforced. | ||
# permissive - SELinux prints warnings instead of enforcing. | ||
# disabled - SELinux is fully disabled. | ||
SELINUX=disabled | ||
# SELINUXTYPE= type of policy in use. Possible values are: | ||
# targeted - Only targeted network daemons are protected. | ||
# strict - Full SELinux protection. | ||
SELINUXTYPE=targeted |