Skip to content

Commit 892cfef

Browse files
committed
Merge pull request #115 from yakara-ltd/selinux-logs
Set SELinux context for log files
2 parents 2d871b2 + 46d4522 commit 892cfef

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

recipes/default.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,13 @@ class unix_stream_socket connectto;
295295
EOF
296296
end
297297

298+
# Set SELinux context for log files, necessary for sendmail to work
299+
["#{node['gitlab']['app_home']}/log(/.*)?", "#{node['gitlab']['shell']['home']}/gitlab-shell\\.log.*"].each do |path|
300+
selinux_policy_fcontext path do
301+
secontext 'var_log_t'
302+
end
303+
end
304+
298305
# logrotate gitlab-shell and gitlab
299306
logrotate_app 'gitlab' do
300307
frequency 'weekly'

0 commit comments

Comments
 (0)