|
Chris PeBenito |
29af4c |
policy_module(cvs, 1.9.0)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# Declarations
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
56e1b3 |
## <desc>
|
|
Chris PeBenito |
56e1b3 |
##
|
|
Chris PeBenito |
56e1b3 |
## Allow cvs daemon to read shadow
|
|
Chris PeBenito |
56e1b3 |
##
|
|
Chris PeBenito |
56e1b3 |
## </desc>
|
|
Chris PeBenito |
0bfccd |
gen_tunable(allow_cvs_read_shadow, false)
|
|
Chris PeBenito |
56e1b3 |
|
|
Chris PeBenito |
17de1b |
type cvs_t;
|
|
Chris PeBenito |
17de1b |
type cvs_exec_t;
|
|
Chris PeBenito |
0bfccd |
inetd_tcp_service_domain(cvs_t, cvs_exec_t)
|
|
Chris PeBenito |
6c9118 |
application_executable_file(cvs_exec_t)
|
|
Chris PeBenito |
17de1b |
role system_r types cvs_t;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type cvs_data_t; # customizable
|
|
Chris PeBenito |
17de1b |
files_type(cvs_data_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
3daef6 |
type cvs_initrc_exec_t;
|
|
Chris PeBenito |
3daef6 |
init_script_file(cvs_initrc_exec_t)
|
|
Chris PeBenito |
3daef6 |
|
|
Chris PeBenito |
17de1b |
type cvs_tmp_t;
|
|
Chris PeBenito |
17de1b |
files_tmp_file(cvs_tmp_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type cvs_var_run_t;
|
|
Chris PeBenito |
17de1b |
files_pid_file(cvs_var_run_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# Local policy
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow cvs_t self:process signal_perms;
|
|
Chris PeBenito |
c0868a |
allow cvs_t self:fifo_file rw_fifo_file_perms;
|
|
Chris PeBenito |
17de1b |
allow cvs_t self:tcp_socket connected_stream_socket_perms;
|
|
Chris PeBenito |
17de1b |
# for identd; cjp: this should probably only be inetd_child rules?
|
|
Chris PeBenito |
17de1b |
allow cvs_t self:netlink_tcpdiag_socket r_netlink_socket_perms;
|
|
Chris PeBenito |
17de1b |
allow cvs_t self:capability { setuid setgid };
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
0bfccd |
manage_dirs_pattern(cvs_t, cvs_data_t, cvs_data_t)
|
|
Chris PeBenito |
0bfccd |
manage_files_pattern(cvs_t, cvs_data_t, cvs_data_t)
|
|
Chris PeBenito |
0bfccd |
manage_lnk_files_pattern(cvs_t, cvs_data_t, cvs_data_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
0bfccd |
manage_dirs_pattern(cvs_t, cvs_tmp_t, cvs_tmp_t)
|
|
Chris PeBenito |
0bfccd |
manage_files_pattern(cvs_t, cvs_tmp_t, cvs_tmp_t)
|
|
Chris PeBenito |
17de1b |
files_tmp_filetrans(cvs_t, cvs_tmp_t, { file dir })
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
0bfccd |
manage_files_pattern(cvs_t, cvs_var_run_t, cvs_var_run_t)
|
|
Chris PeBenito |
0bfccd |
files_pid_filetrans(cvs_t, cvs_var_run_t, file)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
kernel_read_kernel_sysctls(cvs_t)
|
|
Chris PeBenito |
17de1b |
kernel_read_system_state(cvs_t)
|
|
Chris PeBenito |
17de1b |
kernel_read_network_state(cvs_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
190066 |
corenet_all_recvfrom_unlabeled(cvs_t)
|
|
Chris PeBenito |
190066 |
corenet_all_recvfrom_netlabel(cvs_t)
|
|
Chris PeBenito |
668b30 |
corenet_tcp_sendrecv_generic_if(cvs_t)
|
|
Chris PeBenito |
668b30 |
corenet_udp_sendrecv_generic_if(cvs_t)
|
|
Chris PeBenito |
c12621 |
corenet_tcp_sendrecv_generic_node(cvs_t)
|
|
Chris PeBenito |
c12621 |
corenet_udp_sendrecv_generic_node(cvs_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_sendrecv_all_ports(cvs_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_sendrecv_all_ports(cvs_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
dev_read_urand(cvs_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
fs_getattr_xattr_fs(cvs_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
auth_domtrans_chk_passwd(cvs_t)
|
|
Chris PeBenito |
3daef6 |
auth_use_nsswitch(cvs_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
corecmd_exec_bin(cvs_t)
|
|
Chris PeBenito |
17de1b |
corecmd_exec_shell(cvs_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
files_read_etc_files(cvs_t)
|
|
Chris PeBenito |
17de1b |
files_read_etc_runtime_files(cvs_t)
|
|
Chris PeBenito |
17de1b |
# for identd; cjp: this should probably only be inetd_child rules?
|
|
Chris PeBenito |
17de1b |
files_search_home(cvs_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
logging_send_syslog_msg(cvs_t)
|
|
Chris PeBenito |
6c9118 |
logging_send_audit_msgs(cvs_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
miscfiles_read_localization(cvs_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
mta_send_mail(cvs_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# cjp: typeattribute doesnt work in conditionals yet
|
|
Chris PeBenito |
17de1b |
auth_can_read_shadow_passwords(cvs_t)
|
|
Chris PeBenito |
17de1b |
tunable_policy(`allow_cvs_read_shadow',`
|
|
Chris PeBenito |
299db7 |
allow cvs_t self:capability dac_override;
|
|
Chris PeBenito |
17de1b |
auth_tunable_read_shadow(cvs_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
74993c |
kerberos_keytab_template(cvs, cvs_t)
|
|
Chris PeBenito |
17de1b |
kerberos_read_config(cvs_t)
|
|
Chris PeBenito |
17de1b |
kerberos_dontaudit_write_config(cvs_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
74993c |
|
|
Chris PeBenito |
74993c |
########################################
|
|
Chris PeBenito |
74993c |
#
|
|
Chris PeBenito |
74993c |
# CVSWeb policy
|
|
Chris PeBenito |
74993c |
#
|
|
Chris PeBenito |
74993c |
|
|
Chris PeBenito |
74993c |
optional_policy(`
|
|
Chris PeBenito |
74993c |
apache_content_template(cvs)
|
|
Chris PeBenito |
74993c |
|
|
Chris PeBenito |
74993c |
read_files_pattern(httpd_cvs_script_t, cvs_data_t, cvs_data_t)
|
|
Chris PeBenito |
74993c |
manage_dirs_pattern(httpd_cvs_script_t, cvs_tmp_t, cvs_tmp_t)
|
|
Chris PeBenito |
74993c |
manage_files_pattern(httpd_cvs_script_t, cvs_tmp_t, cvs_tmp_t)
|
|
Chris PeBenito |
74993c |
')
|