Fixed SELinux contexts from git data directories.
This commit is contained in:
parent
860d133f60
commit
e31b70b749
1 changed files with 9 additions and 15 deletions
|
@ -33,10 +33,11 @@ class git::server {
|
||||||
|
|
||||||
if $git_datadir {
|
if $git_datadir {
|
||||||
file { $git_datadir:
|
file { $git_datadir:
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
mode => "0755",
|
mode => "0755",
|
||||||
owner => "root",
|
owner => "root",
|
||||||
group => "root",
|
seltype => "git_system_content_t",
|
||||||
|
group => "root",
|
||||||
}
|
}
|
||||||
file { "/srv/git":
|
file { "/srv/git":
|
||||||
ensure => link,
|
ensure => link,
|
||||||
|
@ -49,20 +50,13 @@ class git::server {
|
||||||
mode => "0755",
|
mode => "0755",
|
||||||
owner => "root",
|
owner => "root",
|
||||||
group => "root",
|
group => "root",
|
||||||
seltype => "httpd_sys_content_t",
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if "${selinux}" == "true" {
|
if $git_datadir {
|
||||||
selinux::manage_fcontext { "/srv/git(/.*)?":
|
selinux::manage_fcontext { "${git_datadir}(/.*)?":
|
||||||
type => "httpd_sys_content_t",
|
type => "git_system_content_t",
|
||||||
before => File["/srv/git"],
|
before => File[$git_datadir],
|
||||||
}
|
|
||||||
if $git_datadir {
|
|
||||||
selinux::manage_fcontext { "${git_datadir}(/.*)?":
|
|
||||||
type => "httpd_sys_content_t",
|
|
||||||
before => File[$git_datadir],
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue