Merge "Do not execute selinux commands if policy disabled"
This commit is contained in:
commit
0b792ee258
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue