Chris PeBenito 29af4c
policy_module(prelude, 1.2.0)
Chris PeBenito cdbd09
Chris PeBenito cdbd09
########################################
Chris PeBenito cdbd09
#
Chris PeBenito cdbd09
# Declarations
Chris PeBenito cdbd09
#
Chris PeBenito cdbd09
Chris PeBenito cdbd09
type prelude_t;
Chris PeBenito cdbd09
type prelude_exec_t;
Chris PeBenito cdbd09
init_daemon_domain(prelude_t, prelude_exec_t)
Chris PeBenito cdbd09
Chris PeBenito 46e2fa
type prelude_initrc_exec_t;
Chris PeBenito 46e2fa
init_script_file(prelude_initrc_exec_t)
Chris PeBenito 46e2fa
Chris PeBenito cdbd09
type prelude_spool_t;
Chris PeBenito cdbd09
files_type(prelude_spool_t)
Chris PeBenito cdbd09
Chris PeBenito 46e2fa
type prelude_log_t;
Chris PeBenito 46e2fa
logging_log_file(prelude_log_t)
Chris PeBenito 46e2fa
Chris PeBenito cdbd09
type prelude_var_run_t;
Chris PeBenito cdbd09
files_pid_file(prelude_var_run_t)
Chris PeBenito cdbd09
Chris PeBenito cdbd09
type prelude_var_lib_t;
Chris PeBenito cdbd09
files_type(prelude_var_lib_t)
Chris PeBenito cdbd09
Chris PeBenito cdbd09
type prelude_audisp_t;
Chris PeBenito cdbd09
type prelude_audisp_exec_t;
Chris PeBenito cdbd09
init_daemon_domain(prelude_audisp_t, prelude_audisp_exec_t)
Chris PeBenito 46e2fa
logging_dispatcher_domain(prelude_audisp_t, prelude_audisp_exec_t)
Chris PeBenito cdbd09
Chris PeBenito cdbd09
type prelude_audisp_var_run_t;
Chris PeBenito cdbd09
files_pid_file(prelude_audisp_var_run_t)
Chris PeBenito cdbd09
Chris PeBenito 46e2fa
type prelude_correlator_t;
Chris PeBenito 46e2fa
type prelude_correlator_exec_t;
Chris PeBenito 46e2fa
init_daemon_domain(prelude_correlator_t, prelude_correlator_exec_t)
Chris PeBenito 46e2fa
role system_r types prelude_correlator_t;
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
type prelude_correlator_config_t;
Chris PeBenito 46e2fa
files_config_file(prelude_correlator_config_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
type prelude_lml_t;
Chris PeBenito 46e2fa
type prelude_lml_exec_t;
Chris PeBenito 46e2fa
init_daemon_domain(prelude_lml_t, prelude_lml_exec_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
type prelude_lml_tmp_t;
Chris PeBenito 46e2fa
files_tmp_file(prelude_lml_tmp_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
type prelude_lml_var_run_t;
Chris PeBenito 46e2fa
files_pid_file(prelude_lml_var_run_t)
Chris PeBenito 46e2fa
Chris PeBenito cdbd09
########################################
Chris PeBenito cdbd09
#
Chris PeBenito cdbd09
# prelude local policy
Chris PeBenito cdbd09
#
Chris PeBenito cdbd09
Chris PeBenito 46e2fa
allow prelude_t self:capability { dac_override sys_tty_config };
Chris PeBenito cdbd09
allow prelude_t self:fifo_file rw_file_perms;
Chris PeBenito cdbd09
allow prelude_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito cdbd09
allow prelude_t self:netlink_route_socket r_netlink_socket_perms;
Chris PeBenito cdbd09
allow prelude_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito cdbd09
Chris PeBenito 46e2fa
manage_files_pattern(prelude_t, prelude_log_t, prelude_log_t)
Chris PeBenito 46e2fa
logging_log_filetrans(prelude_t, prelude_log_t, file)
Chris PeBenito 46e2fa
Chris PeBenito cdbd09
manage_dirs_pattern(prelude_t, prelude_spool_t, prelude_spool_t)
Chris PeBenito cdbd09
manage_files_pattern(prelude_t, prelude_spool_t, prelude_spool_t)
Chris PeBenito cdbd09
files_search_spool(prelude_t)
Chris PeBenito cdbd09
Chris PeBenito cdbd09
manage_dirs_pattern(prelude_t, prelude_var_lib_t, prelude_var_lib_t)
Chris PeBenito cdbd09
manage_files_pattern(prelude_t, prelude_var_lib_t, prelude_var_lib_t)
Chris PeBenito cdbd09
files_search_var_lib(prelude_t)
Chris PeBenito cdbd09
Dan Walsh 3eaa99
manage_dirs_pattern(prelude_t, prelude_var_run_t, prelude_var_run_t)
Chris PeBenito cdbd09
manage_files_pattern(prelude_t, prelude_var_run_t, prelude_var_run_t)
Chris PeBenito cdbd09
manage_sock_files_pattern(prelude_t, prelude_var_run_t, prelude_var_run_t)
Dan Walsh 3eaa99
files_pid_filetrans(prelude_t, prelude_var_run_t, { dir file })
Chris PeBenito cdbd09
Chris PeBenito 46e2fa
kernel_read_system_state(prelude_t)
Chris PeBenito 46e2fa
kernel_read_sysctl(prelude_t)
Chris PeBenito 46e2fa
Chris PeBenito cdbd09
corecmd_search_bin(prelude_t)
Chris PeBenito cdbd09
Chris PeBenito cdbd09
corenet_all_recvfrom_unlabeled(prelude_t)
Chris PeBenito cdbd09
corenet_all_recvfrom_netlabel(prelude_t)
Chris PeBenito 668b30
corenet_tcp_sendrecv_generic_if(prelude_t)
Chris PeBenito c12621
corenet_tcp_sendrecv_generic_node(prelude_t)
Chris PeBenito c12621
corenet_tcp_bind_generic_node(prelude_t)
Chris PeBenito 46e2fa
corenet_tcp_bind_prelude_port(prelude_t)
Chris PeBenito 46e2fa
corenet_tcp_connect_prelude_port(prelude_t)
Chris PeBenito 46e2fa
corenet_tcp_connect_postgresql_port(prelude_t)
Jeremy Solt 2b012b
corenet_tcp_connect_mysqld_port(prelude_t)
Chris PeBenito cdbd09
Chris PeBenito cdbd09
dev_read_rand(prelude_t)
Chris PeBenito cdbd09
dev_read_urand(prelude_t)
Chris PeBenito cdbd09
Chris PeBenito cdbd09
files_read_etc_files(prelude_t)
Chris PeBenito 46e2fa
files_read_etc_runtime_files(prelude_t)
Chris PeBenito cdbd09
files_read_usr_files(prelude_t)
Chris PeBenito 46e2fa
files_search_tmp(prelude_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
fs_rw_anon_inodefs_files(prelude_t)
Chris PeBenito cdbd09
Chris PeBenito cdbd09
auth_use_nsswitch(prelude_t)
Chris PeBenito cdbd09
Chris PeBenito cdbd09
logging_send_audit_msgs(prelude_t)
Chris PeBenito cdbd09
logging_send_syslog_msg(prelude_t)
Chris PeBenito cdbd09
Chris PeBenito cdbd09
miscfiles_read_localization(prelude_t)
Chris PeBenito cdbd09
Chris PeBenito cdbd09
optional_policy(`
Chris PeBenito cdbd09
	mysql_search_db(prelude_t)
Chris PeBenito cdbd09
	mysql_stream_connect(prelude_t)
Chris PeBenito cdbd09
')
Chris PeBenito cdbd09
Chris PeBenito cdbd09
optional_policy(`
Chris PeBenito cdbd09
	postgresql_stream_connect(prelude_t)
Chris PeBenito cdbd09
')
Chris PeBenito cdbd09
Chris PeBenito cdbd09
########################################
Chris PeBenito cdbd09
#
Chris PeBenito cdbd09
# prelude_audisp local policy
Chris PeBenito cdbd09
#
Chris PeBenito 1232a5
Chris PeBenito 1232a5
allow prelude_audisp_t self:capability { dac_override ipc_lock setpcap };
Chris PeBenito 1232a5
allow prelude_audisp_t self:process { getcap setcap };
Chris PeBenito cdbd09
allow prelude_audisp_t self:fifo_file rw_file_perms;
Chris PeBenito cdbd09
allow prelude_audisp_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito cdbd09
allow prelude_audisp_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito cdbd09
allow prelude_audisp_t self:netlink_route_socket r_netlink_socket_perms;
Chris PeBenito cdbd09
allow prelude_audisp_t self:tcp_socket create_socket_perms;
Chris PeBenito cdbd09
Chris PeBenito cdbd09
manage_dirs_pattern(prelude_audisp_t, prelude_spool_t, prelude_spool_t)
Chris PeBenito cdbd09
manage_files_pattern(prelude_audisp_t, prelude_spool_t, prelude_spool_t)
Chris PeBenito cdbd09
files_search_spool(prelude_audisp_t)
Chris PeBenito cdbd09
Chris PeBenito cdbd09
manage_sock_files_pattern(prelude_audisp_t, prelude_audisp_var_run_t, prelude_audisp_var_run_t)
Chris PeBenito cdbd09
files_pid_filetrans(prelude_audisp_t, prelude_audisp_var_run_t, sock_file)
Chris PeBenito cdbd09
Chris PeBenito 46e2fa
kernel_read_sysctl(prelude_audisp_t)
Chris PeBenito 46e2fa
kernel_read_system_state(prelude_audisp_t)
Chris PeBenito 46e2fa
Chris PeBenito cdbd09
corecmd_search_bin(prelude_audisp_t)
Chris PeBenito cdbd09
Chris PeBenito cdbd09
corenet_all_recvfrom_unlabeled(prelude_audisp_t)
Chris PeBenito cdbd09
corenet_all_recvfrom_netlabel(prelude_audisp_t)
Chris PeBenito 668b30
corenet_tcp_sendrecv_generic_if(prelude_audisp_t)
Chris PeBenito c12621
corenet_tcp_sendrecv_generic_node(prelude_audisp_t)
Chris PeBenito c12621
corenet_tcp_bind_generic_node(prelude_audisp_t)
Chris PeBenito 46e2fa
corenet_tcp_connect_prelude_port(prelude_audisp_t)
Chris PeBenito cdbd09
Chris PeBenito cdbd09
dev_read_rand(prelude_audisp_t)
Chris PeBenito cdbd09
dev_read_urand(prelude_audisp_t)
Chris PeBenito cdbd09
Chris PeBenito cdbd09
# Init script handling
Chris PeBenito cdbd09
domain_use_interactive_fds(prelude_audisp_t)
Chris PeBenito cdbd09
Chris PeBenito cdbd09
files_read_etc_files(prelude_audisp_t)
Chris PeBenito 46e2fa
files_read_etc_runtime_files(prelude_audisp_t)
Chris PeBenito 46e2fa
files_search_tmp(prelude_audisp_t)
Chris PeBenito cdbd09
Chris PeBenito cdbd09
logging_send_syslog_msg(prelude_audisp_t)
Chris PeBenito cdbd09
Chris PeBenito cdbd09
miscfiles_read_localization(prelude_audisp_t)
Chris PeBenito cdbd09
Chris PeBenito 46e2fa
sysnet_dns_name_resolve(prelude_audisp_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
########################################
Chris PeBenito 46e2fa
#
Chris PeBenito 46e2fa
# prelude_correlator local policy
Chris PeBenito 46e2fa
#
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
allow prelude_correlator_t self:capability dac_override;
Chris PeBenito 46e2fa
allow prelude_correlator_t self:netlink_route_socket r_netlink_socket_perms;
Chris PeBenito 46e2fa
allow prelude_correlator_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 46e2fa
allow prelude_correlator_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
allow prelude_correlator_t prelude_correlator_config_t:dir list_dir_perms;
Chris PeBenito 46e2fa
read_files_pattern(prelude_correlator_t, prelude_correlator_config_t, prelude_correlator_config_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
kernel_read_sysctl(prelude_correlator_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
corecmd_search_bin(prelude_correlator_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
corenet_all_recvfrom_unlabeled(prelude_correlator_t)
Chris PeBenito 46e2fa
corenet_all_recvfrom_netlabel(prelude_correlator_t)
Chris PeBenito 46e2fa
corenet_tcp_sendrecv_generic_if(prelude_correlator_t)
Chris PeBenito 46e2fa
corenet_tcp_sendrecv_generic_node(prelude_correlator_t)
Chris PeBenito 46e2fa
corenet_tcp_connect_prelude_port(prelude_correlator_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
dev_read_rand(prelude_correlator_t)
Chris PeBenito 46e2fa
dev_read_urand(prelude_correlator_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
files_read_etc_files(prelude_correlator_t)
Chris PeBenito 46e2fa
files_read_usr_files(prelude_correlator_t)
Chris PeBenito 46e2fa
files_search_spool(prelude_correlator_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
logging_send_syslog_msg(prelude_correlator_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
miscfiles_read_localization(prelude_correlator_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
sysnet_dns_name_resolve(prelude_correlator_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
prelude_manage_spool(prelude_correlator_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
########################################
Chris PeBenito 46e2fa
#
Chris PeBenito 46e2fa
# prelude_lml local declarations
Chris PeBenito 46e2fa
#
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
allow prelude_lml_t self:capability dac_override;
Chris PeBenito 46e2fa
allow prelude_lml_t self:tcp_socket { write getattr setopt read create connect };
Chris PeBenito 46e2fa
allow prelude_lml_t self:unix_dgram_socket { write create connect };
Chris PeBenito 46e2fa
allow prelude_lml_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito 46e2fa
allow prelude_lml_t self:unix_stream_socket connectto;
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
manage_dirs_pattern(prelude_lml_t, prelude_lml_tmp_t, prelude_lml_tmp_t)
Chris PeBenito 46e2fa
manage_files_pattern(prelude_lml_t, prelude_lml_tmp_t, prelude_lml_tmp_t)
Chris PeBenito 46e2fa
files_tmp_filetrans(prelude_lml_t, prelude_lml_tmp_t, { file dir })
Chris PeBenito 46e2fa
files_list_tmp(prelude_lml_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
manage_dirs_pattern(prelude_lml_t, prelude_spool_t, prelude_spool_t)
Chris PeBenito 46e2fa
manage_files_pattern(prelude_lml_t, prelude_spool_t, prelude_spool_t)
Chris PeBenito 46e2fa
files_search_spool(prelude_lml_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
manage_dirs_pattern(prelude_lml_t, prelude_var_lib_t, prelude_var_lib_t)
Chris PeBenito 46e2fa
manage_files_pattern(prelude_lml_t, prelude_var_lib_t, prelude_var_lib_t)
Chris PeBenito 46e2fa
files_search_var_lib(prelude_lml_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
manage_files_pattern(prelude_lml_t, prelude_lml_var_run_t, prelude_lml_var_run_t)
Chris PeBenito 46e2fa
files_pid_filetrans(prelude_lml_t, prelude_lml_var_run_t, file)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
kernel_read_system_state(prelude_lml_t)
Chris PeBenito 46e2fa
kernel_read_sysctl(prelude_lml_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
corecmd_exec_bin(prelude_lml_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
corenet_tcp_sendrecv_generic_if(prelude_lml_t)
Chris PeBenito 46e2fa
corenet_tcp_sendrecv_generic_node(prelude_lml_t)
Chris PeBenito 46e2fa
corenet_tcp_recvfrom_netlabel(prelude_lml_t)
Chris PeBenito 46e2fa
corenet_tcp_recvfrom_unlabeled(prelude_lml_t)
Chris PeBenito 46e2fa
corenet_sendrecv_unlabeled_packets(prelude_lml_t)
Chris PeBenito 46e2fa
corenet_tcp_connect_prelude_port(prelude_lml_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
dev_read_rand(prelude_lml_t)
Chris PeBenito 46e2fa
dev_read_urand(prelude_lml_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
files_list_etc(prelude_lml_t)
Chris PeBenito 46e2fa
files_read_etc_files(prelude_lml_t)
Chris PeBenito 46e2fa
files_read_etc_runtime_files(prelude_lml_t)
Chris PeBenito 46e2fa
Jeremy Solt 2b012b
fs_getattr_all_fs(prelude_lml_t)
Jeremy Solt 2b012b
fs_list_inotifyfs(prelude_lml_t)
Chris PeBenito 46e2fa
fs_rw_anon_inodefs_files(prelude_lml_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
auth_use_nsswitch(prelude_lml_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
libs_exec_lib_files(prelude_lml_t)
Chris PeBenito 46e2fa
libs_read_lib_files(prelude_lml_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
logging_send_syslog_msg(prelude_lml_t)
Chris PeBenito 46e2fa
logging_read_generic_logs(prelude_lml_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
miscfiles_read_localization(prelude_lml_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
sysnet_dns_name_resolve(prelude_lml_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
userdom_read_all_users_state(prelude_lml_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
optional_policy(`
Chris PeBenito 46e2fa
	apache_search_sys_content(prelude_lml_t)
Chris PeBenito 46e2fa
	apache_read_log(prelude_lml_t)
Chris PeBenito 46e2fa
')
Chris PeBenito 46e2fa
Chris PeBenito cdbd09
########################################
Chris PeBenito cdbd09
#
Chris PeBenito cdbd09
# prewikka_cgi Declarations
Chris PeBenito cdbd09
#
Chris PeBenito cdbd09
Chris PeBenito cdbd09
optional_policy(`
Chris PeBenito cdbd09
	apache_content_template(prewikka)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
	can_exec(httpd_prewikka_script_t, httpd_prewikka_script_exec_t)
Chris PeBenito 46e2fa
Chris PeBenito cdbd09
	files_read_etc_files(httpd_prewikka_script_t)
Chris PeBenito 46e2fa
	files_search_tmp(httpd_prewikka_script_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
	kernel_read_sysctl(httpd_prewikka_script_t)
Chris PeBenito 46e2fa
	kernel_search_network_sysctl(httpd_prewikka_script_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
	corenet_tcp_connect_postgresql_port(httpd_prewikka_script_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
	auth_use_nsswitch(httpd_prewikka_script_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
	logging_send_syslog_msg(httpd_prewikka_script_t)
Chris PeBenito 46e2fa
Chris PeBenito 46e2fa
	apache_search_sys_content(httpd_prewikka_script_t)
Chris PeBenito cdbd09
Chris PeBenito cdbd09
	optional_policy(`
Chris PeBenito cdbd09
		mysql_search_db(httpd_prewikka_script_t)
Chris PeBenito cdbd09
		mysql_stream_connect(httpd_prewikka_script_t)
Chris PeBenito cdbd09
	')
Chris PeBenito cdbd09
Chris PeBenito cdbd09
	optional_policy(`
Chris PeBenito cdbd09
		postgresql_stream_connect(httpd_prewikka_script_t)
Chris PeBenito cdbd09
	')
Chris PeBenito cdbd09
')