Skip to content

Commit c57b91e

Browse files
committed
Set SELinux context for log files
This is necessary for sendmail to work.
1 parent 033b9f2 commit c57b91e

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)