Fixed SELinux context from apache logrotate script in Fedora.

This commit is contained in:
Timo Mkinen 2013-02-06 09:23:27 +02:00
parent f9dc49e9ae
commit f7298b5671

View file

@ -81,9 +81,16 @@ class apache::common {
group => "root", group => "root",
seltype => "httpd_rotatelogs_exec_t", seltype => "httpd_rotatelogs_exec_t",
} }
selinux::manage_fcontext { "/usr/local/sbin/www-logrotate.sh": if $::operatingsystem == "Fedora" and $::operatingsystemrelease > 17 {
type => "httpd_rotatelogs_exec_t", selinux::manage_fcontext { "/usr/sbin/www-logrotate.sh":
before => File["/usr/local/sbin/www-logrotate.sh"], type => "httpd_rotatelogs_exec_t",
before => File["/usr/local/sbin/www-logrotate.sh"],
}
} else {
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":