From d2959c4ed6c5ea9dc09c839edc5a7ac6cc2a968b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Fri, 2 Aug 2013 10:39:54 +0300 Subject: [PATCH] git: Fixed SELinux errors from git daemon. --- git/manifests/init.pp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/git/manifests/init.pp b/git/manifests/init.pp index 42009c1..0a92bfb 100644 --- a/git/manifests/init.pp +++ b/git/manifests/init.pp @@ -43,6 +43,7 @@ class git::server { ensure => link, target => $git_datadir, require => File[$git_datadir], + seltype => "usr_t", } } else { file { "/srv/git": @@ -58,6 +59,10 @@ class git::server { type => "git_system_content_t", 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", owner => "root", group => "root", + seltype => "usr_t", require => File["/srv/git"], } + selinux::manage_fcontext { "/var/lib/git": + type => "usr_t", + before => File["/var/lib/git"], + } } }