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,
|
$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:
|
||||||
|
|
Loading…
Reference in New Issue