Merge "Do not execute selinux commands if policy disabled"

This commit is contained in:
Jenkins 2015-09-29 19:01:52 +00:00 committed by Gerrit Code Review
commit 0b792ee258
1 changed files with 10 additions and 2 deletions

View File

@ -31,7 +31,8 @@ class cgit(
$manage_cgitrc = false, $manage_cgitrc = false,
$prefork_settings = {}, # override the prefork worker settings $prefork_settings = {}, # override the prefork worker settings
$mpm_settings = {}, # override the mpm worker settings $mpm_settings = {}, # override the mpm worker settings
$cgitrc_settings = {} $cgitrc_settings = {},
$selinux_mode = 'enforcing'
) { ) {
validate_hash($prefork_settings) validate_hash($prefork_settings)
validate_hash($mpm_settings) validate_hash($mpm_settings)
@ -228,8 +229,15 @@ class cgit(
} }
if ($::osfamily == 'RedHat') { if ($::osfamily == 'RedHat') {
case $selinux_mode {
'disabled': {
warning('Running with selinux "disabled" is not recommended')
}
default: {
include ::cgit::selinux include ::cgit::selinux
} }
}
}
if $ssl_cert_file_contents != undef { if $ssl_cert_file_contents != undef {
file { $ssl_cert_file: file { $ssl_cert_file: