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
|
@ -36,6 +36,7 @@ class git::server {
|
|||
ensure => directory,
|
||||
mode => "0755",
|
||||
owner => "root",
|
||||
seltype => "git_system_content_t",
|
||||
group => "root",
|
||||
}
|
||||
file { "/srv/git":
|
||||
|
@ -49,22 +50,15 @@ class git::server {
|
|||
mode => "0755",
|
||||
owner => "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 {
|
||||
selinux::manage_fcontext { "${git_datadir}(/.*)?":
|
||||
type => "httpd_sys_content_t",
|
||||
type => "git_system_content_t",
|
||||
before => File[$git_datadir],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue