git: Fixed SELinux errors from git daemon.
This commit is contained in:
parent
ec17f8b8b4
commit
d2959c4ed6
1 changed files with 10 additions and 0 deletions
|
@ -43,6 +43,7 @@ class git::server {
|
||||||
ensure => link,
|
ensure => link,
|
||||||
target => $git_datadir,
|
target => $git_datadir,
|
||||||
require => File[$git_datadir],
|
require => File[$git_datadir],
|
||||||
|
seltype => "usr_t",
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
file { "/srv/git":
|
file { "/srv/git":
|
||||||
|
@ -58,6 +59,10 @@ class git::server {
|
||||||
type => "git_system_content_t",
|
type => "git_system_content_t",
|
||||||
before => File[$git_datadir],
|
before => File[$git_datadir],
|
||||||
}
|
}
|
||||||
|
selinux::manage_fcontext { "/srv/git":
|
||||||
|
type => "usr_t",
|
||||||
|
before => File["/srv/git"],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -87,8 +92,13 @@ class git::daemon inherits git::server {
|
||||||
target => "/srv/git",
|
target => "/srv/git",
|
||||||
owner => "root",
|
owner => "root",
|
||||||
group => "root",
|
group => "root",
|
||||||
|
seltype => "usr_t",
|
||||||
require => File["/srv/git"],
|
require => File["/srv/git"],
|
||||||
}
|
}
|
||||||
|
selinux::manage_fcontext { "/var/lib/git":
|
||||||
|
type => "usr_t",
|
||||||
|
before => File["/var/lib/git"],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue