From f72ec5b3508feb21a2f8375ae136996449d50955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Thu, 27 Jan 2011 13:10:54 +0200 Subject: [PATCH] Fixed selinux contexts from apache datadir. --- apache/manifests/init.pp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apache/manifests/init.pp b/apache/manifests/init.pp index 44d60a6..f1fd670 100644 --- a/apache/manifests/init.pp +++ b/apache/manifests/init.pp @@ -35,6 +35,15 @@ class apache::common { 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": name => $operatingsystem ? { debian => "apache2",