|
Dan Walsh |
3eaa99 |
policy_module(mock,1.0.0)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
# Declarations
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
type mock_t;
|
|
Dan Walsh |
3eaa99 |
type mock_exec_t;
|
|
Dan Walsh |
3eaa99 |
application_domain(mock_t, mock_exec_t)
|
|
Dan Walsh |
3eaa99 |
domain_role_change_exemption(mock_t)
|
|
Dan Walsh |
3eaa99 |
domain_system_change_exemption(mock_t)
|
|
Dan Walsh |
3eaa99 |
role system_r types mock_t;
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
permissive mock_t;
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
type mock_cache_t;
|
|
Dan Walsh |
3eaa99 |
files_type(mock_cache_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
type mock_tmp_t;
|
|
Dan Walsh |
3eaa99 |
files_tmp_file(mock_tmp_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
type mock_var_lib_t;
|
|
Dan Walsh |
3eaa99 |
files_type(mock_var_lib_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
# mock local policy
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dominick Grift |
68ac47 |
|
|
Dan Walsh |
3eaa99 |
allow mock_t self:capability { sys_admin setfcap setuid sys_ptrace sys_chroot chown audit_write dac_override sys_nice mknod fsetid setgid fowner };
|
|
Dan Walsh |
3eaa99 |
allow mock_t self:process { siginh noatsecure signull transition rlimitinh setsched setpgid sigkill };
|
|
Dan Walsh |
3eaa99 |
dontaudit mock_t self:process { siginh noatsecure rlimitinh };
|
|
Dan Walsh |
3eaa99 |
allow mock_t self:fifo_file manage_fifo_file_perms;
|
|
Dan Walsh |
3eaa99 |
allow mock_t self:unix_stream_socket create_stream_socket_perms;
|
|
Dan Walsh |
3eaa99 |
allow mock_t self:unix_dgram_socket create_socket_perms;
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
manage_dirs_pattern(mock_t, mock_cache_t, mock_cache_t)
|
|
Dan Walsh |
3eaa99 |
manage_files_pattern(mock_t, mock_cache_t, mock_cache_t)
|
|
Dan Walsh |
3eaa99 |
files_var_filetrans(mock_t, mock_cache_t, { dir file } )
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
manage_dirs_pattern(mock_t, mock_tmp_t, mock_tmp_t)
|
|
Dan Walsh |
3eaa99 |
manage_files_pattern(mock_t, mock_tmp_t, mock_tmp_t)
|
|
Dominick Grift |
68ac47 |
files_tmp_filetrans(mock_t, mock_tmp_t, { dir file })
|
|
Dan Walsh |
3eaa99 |
can_exec(mock_t, mock_tmp_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
manage_dirs_pattern(mock_t, mock_var_lib_t, mock_var_lib_t)
|
|
Dan Walsh |
3eaa99 |
manage_files_pattern(mock_t, mock_var_lib_t, mock_var_lib_t)
|
|
Dan Walsh |
3eaa99 |
manage_lnk_files_pattern(mock_t, mock_var_lib_t, mock_var_lib_t)
|
|
Dan Walsh |
3eaa99 |
manage_chr_files_pattern(mock_t, mock_var_lib_t, mock_var_lib_t)
|
|
Dominick Grift |
68ac47 |
files_var_lib_filetrans(mock_t, mock_var_lib_t, { dir file })
|
|
Dan Walsh |
3eaa99 |
can_exec(mock_t, mock_var_lib_t)
|
|
Dan Walsh |
3eaa99 |
allow mock_t mock_var_lib_t:dir mounton;
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
kernel_list_proc(mock_t)
|
|
Dan Walsh |
3eaa99 |
kernel_read_irq_sysctls(mock_t)
|
|
Dan Walsh |
3eaa99 |
kernel_read_system_state(mock_t)
|
|
Dan Walsh |
3eaa99 |
kernel_read_kernel_sysctls(mock_t)
|
|
Dan Walsh |
3eaa99 |
kernel_request_load_module(mock_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
corecmd_exec_bin(mock_t)
|
|
Dan Walsh |
3eaa99 |
corecmd_exec_shell(mock_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
corenet_tcp_connect_http_port(mock_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
dev_read_urand(mock_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
domain_read_all_domains_state(mock_t)
|
|
Dan Walsh |
3eaa99 |
domain_use_interactive_fds(mock_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
files_read_etc_files(mock_t)
|
|
Dan Walsh |
3eaa99 |
files_read_usr_files(mock_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
fs_getattr_all_fs(mock_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
selinux_get_enforce_mode(mock_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
auth_use_nsswitch(mock_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
init_exec(mock_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
libs_domtrans_ldconfig(mock_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
logging_send_audit_msgs(mock_t)
|
|
Dan Walsh |
3eaa99 |
logging_send_syslog_msg(mock_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
miscfiles_read_localization(mock_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
mount_domtrans(mock_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
optional_policy(`
|
|
Dan Walsh |
3eaa99 |
rpm_exec(mock_t)
|
|
Dan Walsh |
3eaa99 |
rpm_manage_db(mock_t)
|
|
Dan Walsh |
3eaa99 |
rpm_entry_type(mock_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
optional_policy(`
|
|
Dan Walsh |
3eaa99 |
apache_read_sys_content_rw_files(mock_t)
|
|
Dan Walsh |
3eaa99 |
')
|