added selinux policy for status.dat

This commit is contained in:
Arne Teuke
2017-09-27 14:30:48 +02:00
parent c1203c268d
commit de4abfbdcd
4 changed files with 22 additions and 1 deletions

View File

@@ -946,6 +946,7 @@ $ng_htpasswd_head = 'cd_nagios/nagios/htpasswd_head.erb'
$ng_htpasswd_rule = 'cd_nagios/nagios/htpasswd_rule.erb'
$ng_taccgi_erb = 'cd_nagios/selinux/taccgi.erb'
$ng_statcgi_erb = 'cd_nagios/selinux/statuscgi.erb'
$ng_statdat_erb = 'cd_nagios/selinux/statusdat.erb'
$ng_checknrpe_erb = 'cd_nagios/selinux/checknrpe.erb'
$ng_checknagios_erb = 'cd_nagios/selinux/checknagios.erb'
$ng_nagios_conf = '/etc/httpd/conf.d/nagios.conf'

View File

@@ -110,5 +110,24 @@ class cd_nagios::selinux::config (
refreshonly => true,
notify => Service[$ng_service],
}
# sealert status.dat
exec { 'create_policy_statusdat':
command => template($ng_statdat_erb),
path => ['/usr/bin','/usr/sbin'],
cwd => $ng_user_home,
creates => "${ng_user_home}/my-http.pp",
notify => Exec['semodule_statusdat'],
}
exec { 'semodule_statusdat':
command => 'semodule -i my-http.pp',
path => ['/usr/bin','/usr/sbin'],
cwd => $ng_user_home,
require => Exec['create_policy_statusdat'],
refreshonly => true,
notify => Service[$ng_service],
}
}
}