|
Chris PeBenito |
29b580 |
policy_module(sectoolm, 1.0.0)
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
########################################
|
|
Chris PeBenito |
29b580 |
#
|
|
Chris PeBenito |
29b580 |
# Declarations
|
|
Chris PeBenito |
29b580 |
#
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
type sectoolm_t;
|
|
Chris PeBenito |
29b580 |
type sectoolm_exec_t;
|
|
Chris PeBenito |
29b580 |
dbus_system_domain(sectoolm_t, sectoolm_exec_t)
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
type sectool_var_lib_t;
|
|
Chris PeBenito |
29b580 |
files_type(sectool_var_lib_t)
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
type sectool_var_log_t;
|
|
Chris PeBenito |
29b580 |
logging_log_file(sectool_var_log_t)
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
type sectool_tmp_t;
|
|
Chris PeBenito |
29b580 |
files_tmp_file(sectool_tmp_t)
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
########################################
|
|
Chris PeBenito |
29b580 |
#
|
|
Chris PeBenito |
29b580 |
# sectool local policy
|
|
Chris PeBenito |
29b580 |
#
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
allow sectoolm_t self:capability { dac_override net_admin sys_nice sys_ptrace };
|
|
Chris PeBenito |
29b580 |
allow sectoolm_t self:process { getcap getsched signull setsched };
|
|
Chris PeBenito |
29b580 |
dontaudit sectoolm_t self:process { execstack execmem };
|
|
Chris PeBenito |
29b580 |
allow sectoolm_t self:fifo_file rw_fifo_file_perms;
|
|
Chris PeBenito |
29b580 |
allow sectoolm_t self:unix_dgram_socket { create_socket_perms sendto };
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
manage_dirs_pattern(sectoolm_t, sectool_tmp_t, sectool_tmp_t)
|
|
Chris PeBenito |
29b580 |
manage_files_pattern(sectoolm_t, sectool_tmp_t, sectool_tmp_t)
|
|
Chris PeBenito |
29b580 |
files_tmp_filetrans(sectoolm_t, sectool_tmp_t, { file dir })
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
manage_files_pattern(sectoolm_t, sectool_var_lib_t, sectool_var_lib_t)
|
|
Chris PeBenito |
29b580 |
manage_dirs_pattern(sectoolm_t, sectool_var_lib_t, sectool_var_lib_t)
|
|
Chris PeBenito |
29b580 |
files_var_lib_filetrans(sectoolm_t, sectool_var_lib_t, { file dir })
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
manage_files_pattern(sectoolm_t, sectool_var_log_t, sectool_var_log_t)
|
|
Chris PeBenito |
29b580 |
logging_log_filetrans(sectoolm_t, sectool_var_log_t, file)
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
kernel_read_net_sysctls(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
kernel_read_network_state(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
kernel_read_kernel_sysctls(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
corecmd_exec_bin(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
corecmd_exec_shell(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
dev_read_sysfs(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
dev_read_urand(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
dev_getattr_all_blk_files(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
dev_getattr_all_chr_files(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
domain_getattr_all_domains(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
domain_read_all_domains_state(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
files_getattr_all_pipes(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
files_getattr_all_sockets(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
files_read_all_files(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
files_read_all_symlinks(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
fs_getattr_all_fs(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
fs_list_noxattr_fs(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
selinux_validate_context(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
# tcp_wrappers test
|
|
Chris PeBenito |
29b580 |
application_exec_all(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
auth_use_nsswitch(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
# tests related to network
|
|
Chris PeBenito |
29b580 |
hostname_exec(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
# tests related to network
|
|
Chris PeBenito |
29b580 |
iptables_domtrans(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
libs_exec_ld_so(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
logging_send_syslog_msg(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
# tests related to network
|
|
Chris PeBenito |
29b580 |
sysnet_domtrans_ifconfig(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
userdom_manage_user_tmp_sockets(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
optional_policy(`
|
|
Chris PeBenito |
29b580 |
mount_exec(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
')
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
optional_policy(`
|
|
Chris PeBenito |
29b580 |
policykit_dbus_chat(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
')
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
# suid test using
|
|
Chris PeBenito |
29b580 |
# rpm -Vf option
|
|
Chris PeBenito |
29b580 |
optional_policy(`
|
|
Chris PeBenito |
29b580 |
prelink_domtrans(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
')
|
|
Chris PeBenito |
29b580 |
|
|
Chris PeBenito |
29b580 |
optional_policy(`
|
|
Chris PeBenito |
29b580 |
rpm_exec(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
rpm_dontaudit_manage_db(sectoolm_t)
|
|
Chris PeBenito |
29b580 |
')
|
|
Chris PeBenito |
29b580 |
|