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,
$prefork_settings = {}, # override the prefork worker settings
$mpm_settings = {}, # override the mpm worker settings
$cgitrc_settings = {}
$cgitrc_settings = {},
$selinux_mode = 'enforcing'
) {
validate_hash($prefork_settings)
validate_hash($mpm_settings)
@ -228,7 +229,14 @@ class cgit(
}
if ($::osfamily == 'RedHat') {
include ::cgit::selinux
case $selinux_mode {
'disabled': {
warning('Running with selinux "disabled" is not recommended')
}
default: {
include ::cgit::selinux
}
}
}
if $ssl_cert_file_contents != undef {