commit: 4896ffe78b0ad5ce485f252084c40853323945dd Author: Jason Zaman <jason <AT> perfinion <DOT> com> AuthorDate: Mon Aug 24 15:10:08 2015 +0000 Commit: Sven Vermeulen <swift <AT> gentoo <DOT> org> CommitDate: Thu Aug 27 19:08:31 2015 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=4896ffe7
git: allow git_system_t to listen on tcp_sockets git_session_t already has these permissions but they are missing on git_system_t. Instead add the perms on the git_daemon attribute which covers both system and session daemons. policy/modules/contrib/git.te | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/policy/modules/contrib/git.te b/policy/modules/contrib/git.te index 1ca8c24..517d513 100644 --- a/policy/modules/contrib/git.te +++ b/policy/modules/contrib/git.te @@ -103,8 +103,6 @@ userdom_user_home_content(git_user_content_t) # Session policy # -allow git_session_t self:tcp_socket { accept listen }; - userdom_search_user_home_dirs(git_session_t) corenet_all_recvfrom_netlabel(git_session_t) @@ -266,6 +264,7 @@ tunable_policy(`git_cgi_use_nfs',` # allow git_daemon self:fifo_file rw_fifo_file_perms; +allow git_daemon self:tcp_socket { accept listen }; list_dirs_pattern(git_daemon, git_user_content_t, git_user_content_t) read_files_pattern(git_daemon, git_user_content_t, git_user_content_t)