SELinux fixes for apache module.
This commit is contained in:
parent
f6ed541068
commit
500c026131
1 changed files with 10 additions and 14 deletions
|
@ -28,7 +28,10 @@ class apache::common {
|
||||||
group => "root",
|
group => "root",
|
||||||
seltype => "httpd_sys_content_t",
|
seltype => "httpd_sys_content_t",
|
||||||
}
|
}
|
||||||
|
selinux::manage_fcontext { "${apache_datadir}(/.*)?":
|
||||||
|
type => "httpd_sys_content_t",
|
||||||
|
before => File[$apache_datadir],
|
||||||
|
}
|
||||||
file { "/srv/www":
|
file { "/srv/www":
|
||||||
ensure => link,
|
ensure => link,
|
||||||
target => $apache_datadir,
|
target => $apache_datadir,
|
||||||
|
@ -51,15 +54,6 @@ class apache::common {
|
||||||
require => File["/srv/www"],
|
require => File["/srv/www"],
|
||||||
}
|
}
|
||||||
|
|
||||||
if "${selinux}" == "true" {
|
|
||||||
if $apache_datadir {
|
|
||||||
selinux::manage_fcontext { "${apache_datadir}(/.*)?":
|
|
||||||
type => "httpd_sys_content_t",
|
|
||||||
before => File[$apache_datadir],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
package { "httpd":
|
package { "httpd":
|
||||||
name => $operatingsystem ? {
|
name => $operatingsystem ? {
|
||||||
debian => "apache2",
|
debian => "apache2",
|
||||||
|
@ -73,12 +67,14 @@ class apache::common {
|
||||||
ensure => present,
|
ensure => present,
|
||||||
source => "puppet:///modules/apache/www-logrotate.sh",
|
source => "puppet:///modules/apache/www-logrotate.sh",
|
||||||
mode => "0755",
|
mode => "0755",
|
||||||
owner => root,
|
owner => "root",
|
||||||
group => root,
|
group => "root",
|
||||||
seluser => "system_u",
|
|
||||||
selrole => "object_r",
|
|
||||||
seltype => "httpd_rotatelogs_exec_t",
|
seltype => "httpd_rotatelogs_exec_t",
|
||||||
}
|
}
|
||||||
|
selinux::manage_fcontext { "/usr/local/sbin/www-logrotate.sh":
|
||||||
|
type => "httpd_rotatelogs_exec_t",
|
||||||
|
before => File["/usr/local/sbin/www-logrotate.sh"],
|
||||||
|
}
|
||||||
|
|
||||||
cron { "www-logrotate":
|
cron { "www-logrotate":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue