From 98d399b116869de2d04aff76af9bb60c9d5bfc14 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Fri, 14 Feb 2014 12:03:38 +0100 Subject: [PATCH] Make ~git/.ssh/authorized_keys valid for SELinux --- files/gitlab-cookbooks/gitlab/recipes/gitlab-shell.rb | 6 ++++++ 1 file changed, 6 insertions(+), 0 deletions(-) diff --git a/files/gitlab-cookbooks/gitlab/recipes/gitlab-shell.rb b/files/gitlab-cookbooks/gitlab/recipes/gitlab-shell.rb index afac02a..4a915fd 100644 --- a/files/gitlab-cookbooks/gitlab/recipes/gitlab-shell.rb +++ b/files/gitlab-cookbooks/gitlab/recipes/gitlab-shell.rb @@ -38,6 +38,12 @@ directory ssh_dir do recursive true end +# If SELinux is enabled, make sure that OpenSSH thinks the .ssh directory of the +# git_user is valid. +execute "chcon -t user_home_t #{ssh_dir}" do + only_if "id -Z" +end + directory log_directory do owner git_user recursive true -- libgit2 0.21.2