From 3cf867862d8b993464e7bc498d8224e7b5fb9659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Thu, 16 Feb 2012 10:19:18 +0200 Subject: [PATCH] CentOS 5 SELinux context fixes for BackupPC exported resources. --- backuppc/manifests/init.pp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/backuppc/manifests/init.pp b/backuppc/manifests/init.pp index c710dd7..e8a3f47 100644 --- a/backuppc/manifests/init.pp +++ b/backuppc/manifests/init.pp @@ -25,7 +25,6 @@ define backuppc::manualclient($ensure = "present", $operatingsystem = "default") mode => 0640, owner => root, group => backuppc, - seltype => "httpd_sys_rw_content_t", tag => "backuppc", require => File["/etc/BackupPC/pc"], notify => Exec["generate-backuppc-hosts"], @@ -191,7 +190,15 @@ class backuppc::server { notify => Service["backuppc"], } - File <<| tag == "backuppc" |>> + File <<| tag == "backuppc" |>> { + seltype => $operatingsystem ? { + "centos" => $operatingsystemrelease ? { + /^5/ => "httpd_sys_script_rw_t", + default => "httpd_sys_rw_content_t", + }, + default => "httpd_sys_rw_content_t", + }, + } service { "backuppc": ensure => running,