Fixed SELinux contexts from git data directories.

This commit is contained in:
Timo Mkinen 2013-02-08 08:53:52 +02:00
parent 860d133f60
commit e31b70b749

View file

@ -36,6 +36,7 @@ class git::server {
ensure => directory, ensure => directory,
mode => "0755", mode => "0755",
owner => "root", owner => "root",
seltype => "git_system_content_t",
group => "root", group => "root",
} }
file { "/srv/git": file { "/srv/git":
@ -49,22 +50,15 @@ class git::server {
mode => "0755", mode => "0755",
owner => "root", owner => "root",
group => "root", group => "root",
seltype => "httpd_sys_content_t",
} }
} }
if "${selinux}" == "true" {
selinux::manage_fcontext { "/srv/git(/.*)?":
type => "httpd_sys_content_t",
before => File["/srv/git"],
}
if $git_datadir { if $git_datadir {
selinux::manage_fcontext { "${git_datadir}(/.*)?": selinux::manage_fcontext { "${git_datadir}(/.*)?":
type => "httpd_sys_content_t", type => "git_system_content_t",
before => File[$git_datadir], before => File[$git_datadir],
} }
} }
}
} }