CentOS 5 fixes for BackupPC SELinux contexts.
This commit is contained in:
parent
a6a90ae56b
commit
eb31970333
1 changed files with 33 additions and 7 deletions
|
@ -105,18 +105,26 @@ class backuppc::server {
|
|||
require => Package["BackupPC"],
|
||||
}
|
||||
|
||||
if $operatingsystem == "CentOS" and $operatingsystemrelease >= 6 {
|
||||
if "${selinux}" == "true" {
|
||||
selinux::manage_fcontext { "/etc/BackupPC(/.*)?":
|
||||
type => "httpd_sys_rw_content_t",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
file { "/etc/BackupPC/apache.users":
|
||||
ensure => present,
|
||||
mode => 0640,
|
||||
owner => "root",
|
||||
group => $apache::sslserver::group,
|
||||
seltype => "httpd_sys_rw_content_t",
|
||||
seltype => $operatingsystem ? {
|
||||
"centos" => $operatingsystemrelease ? {
|
||||
/^5/ => "httpd_sys_script_rw_t",
|
||||
default => "httpd_sys_rw_content_t",
|
||||
},
|
||||
default => "httpd_sys_rw_content_t",
|
||||
},
|
||||
require => Package["BackupPC"],
|
||||
}
|
||||
|
||||
|
@ -126,7 +134,13 @@ class backuppc::server {
|
|||
mode => 0440,
|
||||
owner => "backuppc",
|
||||
group => "backuppc",
|
||||
seltype => "httpd_sys_rw_content_t",
|
||||
seltype => $operatingsystem ? {
|
||||
"centos" => $operatingsystemrelease ? {
|
||||
/^5/ => "httpd_sys_script_rw_t",
|
||||
default => "httpd_sys_rw_content_t",
|
||||
},
|
||||
default => "httpd_sys_rw_content_t",
|
||||
},
|
||||
require => Package["BackupPC"],
|
||||
notify => Service["backuppc"],
|
||||
}
|
||||
|
@ -138,7 +152,13 @@ class backuppc::server {
|
|||
mode => 0644,
|
||||
owner => "root",
|
||||
group => "backuppc",
|
||||
seltype => "httpd_sys_rw_content_t",
|
||||
seltype => $operatingsystem ? {
|
||||
"centos" => $operatingsystemrelease ? {
|
||||
/^5/ => "httpd_sys_script_rw_t",
|
||||
default => "httpd_sys_rw_content_t",
|
||||
},
|
||||
default => "httpd_sys_rw_content_t",
|
||||
},
|
||||
require => Package["BackupPC"],
|
||||
notify => Exec["generate-backuppc-hosts"],
|
||||
}
|
||||
|
@ -151,7 +171,13 @@ class backuppc::server {
|
|||
mode => 0640,
|
||||
owner => "root",
|
||||
group => "backuppc",
|
||||
seltype => "httpd_sys_rw_content_t",
|
||||
seltype => $operatingsystem ? {
|
||||
"centos" => $operatingsystemrelease ? {
|
||||
/^5/ => "httpd_sys_script_rw_t",
|
||||
default => "httpd_sys_rw_content_t",
|
||||
},
|
||||
default => "httpd_sys_rw_content_t",
|
||||
},
|
||||
source => "puppet:///modules/custom/empty",
|
||||
require => Package["BackupPC"],
|
||||
notify => Exec["generate-backuppc-hosts"],
|
||||
|
|
Loading…
Add table
Reference in a new issue