|
Dan Walsh |
3eaa99 |
## <summary>Fast Version Control System.</summary>
|
|
Dan Walsh |
3eaa99 |
## <desc>
|
|
Dan Walsh |
3eaa99 |
##
|
|
Dan Walsh |
3eaa99 |
## A really simple TCP git daemon that normally listens on
|
|
Dan Walsh |
3eaa99 |
## port DEFAULT_GIT_PORT aka 9418. It waits for a
|
|
Dan Walsh |
3eaa99 |
## connection asking for a service, and will serve that
|
|
Dan Walsh |
3eaa99 |
## service if it is enabled.
|
|
Dan Walsh |
3eaa99 |
##
|
|
Dan Walsh |
3eaa99 |
## </desc>
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
#######################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Role access for Git daemon session.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="role">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Role allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## User domain for the role.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`git_session_role',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
type git_session_t, gitd_exec_t;
|
|
Dan Walsh |
3eaa99 |
type git_session_content_t;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
# Git daemon session shared declarations.
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
role $1 types git_session_t;
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
# Git daemon session shared policy.
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
domtrans_pattern($2, gitd_exec_t, git_session_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
allow $2 git_session_t:process { ptrace signal_perms };
|
|
Dan Walsh |
3eaa99 |
ps_process_pattern($2, git_session_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Create a set of derived types for Git
|
|
Dan Walsh |
3eaa99 |
## daemon shared repository content.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="prefix">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## The prefix to be used for deriving type names.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
template(`git_content_template',`
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
attribute git_system_content;
|
|
Dan Walsh |
3eaa99 |
attribute git_content;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
# Git daemon content shared declarations.
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
type git_$1_content_t, git_system_content, git_content;
|
|
Dan Walsh |
3eaa99 |
files_type(git_$1_content_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Create a set of derived types for Git
|
|
Dan Walsh |
3eaa99 |
## daemon shared repository roles.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="prefix">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## The prefix to be used for deriving type names.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
template(`git_role_template',`
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
class context contains;
|
|
Dan Walsh |
3eaa99 |
role system_r;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
# Git daemon role shared declarations.
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
attribute $1_usertype;
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
type $1_t;
|
|
Dan Walsh |
3eaa99 |
userdom_unpriv_usertype($1, $1_t)
|
|
Dan Walsh |
3eaa99 |
domain_type($1_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
role $1_r types $1_t;
|
|
Dan Walsh |
3eaa99 |
allow system_r $1_r;
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
# Git daemon role shared policy.
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
allow $1_t self:context contains;
|
|
Dan Walsh |
3eaa99 |
allow $1_t self:fifo_file rw_fifo_file_perms;
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
corecmd_exec_bin($1_t)
|
|
Dan Walsh |
3eaa99 |
corecmd_bin_entry_type($1_t)
|
|
Dan Walsh |
3eaa99 |
corecmd_shell_entry_type($1_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
domain_interactive_fd($1_t)
|
|
Dan Walsh |
3eaa99 |
domain_user_exemption_target($1_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
kernel_read_system_state($1_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
files_read_etc_files($1_t)
|
|
Dan Walsh |
3eaa99 |
files_dontaudit_search_home($1_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
miscfiles_read_localization($1_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
git_rwx_generic_system_content($1_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
ssh_rw_stream_sockets($1_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`git_system_use_cifs',`
|
|
Dan Walsh |
3eaa99 |
fs_exec_cifs_files($1_t)
|
|
Dan Walsh |
3eaa99 |
fs_manage_cifs_dirs($1_t)
|
|
Dan Walsh |
3eaa99 |
fs_manage_cifs_files($1_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`git_system_use_nfs',`
|
|
Dan Walsh |
3eaa99 |
fs_exec_nfs_files($1_t)
|
|
Dan Walsh |
3eaa99 |
fs_manage_nfs_dirs($1_t)
|
|
Dan Walsh |
3eaa99 |
fs_manage_nfs_files($1_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
optional_policy(`
|
|
Dan Walsh |
3eaa99 |
nscd_read_pid($1_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
#######################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Allow specified domain access to the
|
|
Dan Walsh |
3eaa99 |
## specified Git daemon content.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
## <param name="object">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Type of the object that access is allowed to.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`git_content_delegation',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
type $1, $2;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
exec_files_pattern($1, $2, $2)
|
|
Dan Walsh |
3eaa99 |
manage_dirs_pattern($1, $2, $2)
|
|
Dan Walsh |
3eaa99 |
manage_files_pattern($1, $2, $2)
|
|
Dan Walsh |
3eaa99 |
files_search_var_lib($1)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`git_system_use_cifs',`
|
|
Dan Walsh |
3eaa99 |
fs_exec_cifs_files($1)
|
|
Dan Walsh |
3eaa99 |
fs_manage_cifs_dirs($1)
|
|
Dan Walsh |
3eaa99 |
fs_manage_cifs_files($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`git_system_use_nfs',`
|
|
Dan Walsh |
3eaa99 |
fs_exec_nfs_files($1)
|
|
Dan Walsh |
3eaa99 |
fs_manage_nfs_dirs($1)
|
|
Dan Walsh |
3eaa99 |
fs_manage_nfs_files($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Allow the specified domain to manage
|
|
Dan Walsh |
3eaa99 |
## and execute all Git daemon content.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`git_rwx_all_content',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
attribute git_content;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
exec_files_pattern($1, git_content, git_content)
|
|
Dan Walsh |
3eaa99 |
manage_dirs_pattern($1, git_content, git_content)
|
|
Dan Walsh |
3eaa99 |
manage_files_pattern($1, git_content, git_content)
|
|
Dan Walsh |
3eaa99 |
userdom_search_user_home_dirs($1)
|
|
Dan Walsh |
3eaa99 |
files_search_var_lib($1)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`use_nfs_home_dirs',`
|
|
Dan Walsh |
3eaa99 |
fs_exec_nfs_files($1)
|
|
Dan Walsh |
3eaa99 |
fs_manage_nfs_dirs($1)
|
|
Dan Walsh |
3eaa99 |
fs_manage_nfs_files($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`use_samba_home_dirs',`
|
|
Dan Walsh |
3eaa99 |
fs_exec_cifs_files($1)
|
|
Dan Walsh |
3eaa99 |
fs_manage_cifs_dirs($1)
|
|
Dan Walsh |
3eaa99 |
fs_manage_cifs_files($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`git_system_use_cifs',`
|
|
Dan Walsh |
3eaa99 |
fs_exec_cifs_files($1)
|
|
Dan Walsh |
3eaa99 |
fs_manage_cifs_dirs($1)
|
|
Dan Walsh |
3eaa99 |
fs_manage_cifs_files($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`git_system_use_nfs',`
|
|
Dan Walsh |
3eaa99 |
fs_exec_nfs_files($1)
|
|
Dan Walsh |
3eaa99 |
fs_manage_nfs_dirs($1)
|
|
Dan Walsh |
3eaa99 |
fs_manage_nfs_files($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Allow the specified domain to manage
|
|
Dan Walsh |
3eaa99 |
## and execute all Git daemon system content.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`git_rwx_all_system_content',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
attribute git_system_content;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
exec_files_pattern($1, git_system_content, git_system_content)
|
|
Dan Walsh |
3eaa99 |
manage_dirs_pattern($1, git_system_content, git_system_content)
|
|
Dan Walsh |
3eaa99 |
manage_files_pattern($1, git_system_content, git_system_content)
|
|
Dan Walsh |
3eaa99 |
files_search_var_lib($1)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`git_system_use_cifs',`
|
|
Dan Walsh |
3eaa99 |
fs_exec_cifs_files($1)
|
|
Dan Walsh |
3eaa99 |
fs_manage_cifs_dirs($1)
|
|
Dan Walsh |
3eaa99 |
fs_manage_cifs_files($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`git_system_use_nfs',`
|
|
Dan Walsh |
3eaa99 |
fs_exec_nfs_files($1)
|
|
Dan Walsh |
3eaa99 |
fs_manage_nfs_dirs($1)
|
|
Dan Walsh |
3eaa99 |
fs_manage_nfs_files($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Allow the specified domain to manage
|
|
Dan Walsh |
3eaa99 |
## and execute Git daemon generic system content.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`git_rwx_generic_system_content',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
type git_system_content_t;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
exec_files_pattern($1, git_system_content_t, git_system_content_t)
|
|
Dan Walsh |
3eaa99 |
manage_dirs_pattern($1, git_system_content_t, git_system_content_t)
|
|
Dan Walsh |
3eaa99 |
manage_files_pattern($1, git_system_content_t, git_system_content_t)
|
|
Dan Walsh |
3eaa99 |
files_search_var_lib($1)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`git_system_use_cifs',`
|
|
Dan Walsh |
3eaa99 |
fs_exec_cifs_files($1)
|
|
Dan Walsh |
3eaa99 |
fs_manage_cifs_dirs($1)
|
|
Dan Walsh |
3eaa99 |
fs_manage_cifs_files($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`git_system_use_nfs',`
|
|
Dan Walsh |
3eaa99 |
fs_exec_nfs_files($1)
|
|
Dan Walsh |
3eaa99 |
fs_manage_nfs_dirs($1)
|
|
Dan Walsh |
3eaa99 |
fs_manage_nfs_files($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Allow the specified domain to read
|
|
Dan Walsh |
3eaa99 |
## all Git daemon content files.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`git_read_all_content_files',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
attribute git_content;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
list_dirs_pattern($1, git_content, git_content)
|
|
Dan Walsh |
3eaa99 |
read_files_pattern($1, git_content, git_content)
|
|
Dan Walsh |
3eaa99 |
userdom_search_user_home_dirs($1)
|
|
Dan Walsh |
3eaa99 |
files_search_var_lib($1)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`use_nfs_home_dirs',`
|
|
Dan Walsh |
3eaa99 |
fs_list_nfs($1)
|
|
Dan Walsh |
3eaa99 |
fs_read_nfs_files($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`use_samba_home_dirs',`
|
|
Dan Walsh |
3eaa99 |
fs_list_cifs($1)
|
|
Dan Walsh |
3eaa99 |
fs_read_cifs_files($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`git_system_use_cifs',`
|
|
Dan Walsh |
3eaa99 |
fs_list_cifs($1)
|
|
Dan Walsh |
3eaa99 |
fs_read_cifs_files($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`git_system_use_nfs',`
|
|
Dan Walsh |
3eaa99 |
fs_list_nfs($1)
|
|
Dan Walsh |
3eaa99 |
fs_read_nfs_files($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Allow the specified domain to read
|
|
Dan Walsh |
3eaa99 |
## Git daemon session content files.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`git_read_session_content_files',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
type git_session_content_t;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
list_dirs_pattern($1, git_session_content_t, git_session_content_t)
|
|
Dan Walsh |
3eaa99 |
read_files_pattern($1, git_session_content_t, git_session_content_t)
|
|
Dan Walsh |
3eaa99 |
userdom_search_user_home_dirs($1)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`use_nfs_home_dirs',`
|
|
Dan Walsh |
3eaa99 |
fs_list_nfs($1)
|
|
Dan Walsh |
3eaa99 |
fs_read_nfs_files($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`use_samba_home_dirs',`
|
|
Dan Walsh |
3eaa99 |
fs_list_cifs($1)
|
|
Dan Walsh |
3eaa99 |
fs_read_cifs_files($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Allow the specified domain to read
|
|
Dan Walsh |
3eaa99 |
## all Git daemon system content files.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`git_read_all_system_content_files',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
attribute git_system_content;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
list_dirs_pattern($1, git_system_content, git_system_content)
|
|
Dan Walsh |
3eaa99 |
read_files_pattern($1, git_system_content, git_system_content)
|
|
Dan Walsh |
3eaa99 |
files_search_var_lib($1)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`git_system_use_cifs',`
|
|
Dan Walsh |
3eaa99 |
fs_list_cifs($1)
|
|
Dan Walsh |
3eaa99 |
fs_read_cifs_files($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`git_system_use_nfs',`
|
|
Dan Walsh |
3eaa99 |
fs_list_nfs($1)
|
|
Dan Walsh |
3eaa99 |
fs_read_nfs_files($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Allow the specified domain to read
|
|
Dan Walsh |
3eaa99 |
## Git daemon generic system content files.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`git_read_generic_system_content_files',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
type git_system_content_t;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
list_dirs_pattern($1, git_system_content_t, git_system_content_t)
|
|
Dan Walsh |
3eaa99 |
read_files_pattern($1, git_system_content_t, git_system_content_t)
|
|
Dan Walsh |
3eaa99 |
files_search_var_lib($1)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`git_system_use_cifs',`
|
|
Dan Walsh |
3eaa99 |
fs_list_cifs($1)
|
|
Dan Walsh |
3eaa99 |
fs_read_cifs_files($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`git_system_use_nfs',`
|
|
Dan Walsh |
3eaa99 |
fs_list_nfs($1)
|
|
Dan Walsh |
3eaa99 |
fs_read_nfs_files($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Allow the specified domain to relabel
|
|
Dan Walsh |
3eaa99 |
## all Git daemon content.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`git_relabel_all_content',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
attribute git_content;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
relabel_dirs_pattern($1, git_content, git_content)
|
|
Dan Walsh |
3eaa99 |
relabel_files_pattern($1, git_content, git_content)
|
|
Dan Walsh |
3eaa99 |
userdom_search_user_home_dirs($1)
|
|
Dan Walsh |
3eaa99 |
files_search_var_lib($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Allow the specified domain to relabel
|
|
Dan Walsh |
3eaa99 |
## all Git daemon system content.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`git_relabel_all_system_content',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
attribute git_system_content;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
relabel_dirs_pattern($1, git_system_content, git_system_content)
|
|
Dan Walsh |
3eaa99 |
relabel_files_pattern($1, git_system_content, git_system_content)
|
|
Dan Walsh |
3eaa99 |
files_search_var_lib($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Allow the specified domain to relabel
|
|
Dan Walsh |
3eaa99 |
## Git daemon generic system content.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`git_relabel_generic_system_content',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
type git_system_content_t;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
relabel_dirs_pattern($1, git_system_content_t, git_system_content_t)
|
|
Dan Walsh |
3eaa99 |
relabel_files_pattern($1, git_system_content_t, git_system_content_t)
|
|
Dan Walsh |
3eaa99 |
files_search_var_lib($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Allow the specified domain to relabel
|
|
Dan Walsh |
3eaa99 |
## Git daemon session content.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`git_relabel_session_content',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
type git_session_content_t;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
relabel_dirs_pattern($1, git_session_content_t, git_session_content_t)
|
|
Dan Walsh |
3eaa99 |
relabel_files_pattern($1, git_session_content_t, git_session_content_t)
|
|
Dan Walsh |
3eaa99 |
userdom_search_user_home_dirs($1)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|