2021-01-13 20:20:47 +00:00
|
|
|
policy_module(perdition, 1.13.1)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type perdition_t;
|
|
|
|
type perdition_exec_t;
|
|
|
|
init_daemon_domain(perdition_t, perdition_exec_t)
|
|
|
|
|
|
|
|
type perdition_etc_t;
|
|
|
|
files_config_file(perdition_etc_t)
|
|
|
|
|
2019-09-11 00:05:46 +00:00
|
|
|
type perdition_initrc_exec_t;
|
|
|
|
init_script_file(perdition_initrc_exec_t)
|
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
type perdition_runtime_t alias perdition_var_run_t;
|
2020-06-27 21:11:48 +00:00
|
|
|
files_runtime_file(perdition_runtime_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow perdition_t self:capability { chown dac_override fowner setgid setuid };
|
|
|
|
dontaudit perdition_t self:capability sys_tty_config;
|
|
|
|
allow perdition_t self:process signal_perms;
|
|
|
|
allow perdition_t self:tcp_socket { accept listen };
|
|
|
|
|
|
|
|
allow perdition_t perdition_etc_t:dir list_dir_perms;
|
|
|
|
allow perdition_t perdition_etc_t:file read_file_perms;
|
|
|
|
allow perdition_t perdition_etc_t:lnk_file read_lnk_file_perms;
|
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
manage_files_pattern(perdition_t, perdition_runtime_t, perdition_runtime_t)
|
|
|
|
manage_dirs_pattern(perdition_t, perdition_runtime_t, perdition_runtime_t)
|
2020-06-27 21:11:48 +00:00
|
|
|
files_runtime_filetrans(perdition_t, perdition_runtime_t, { file dir })
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
kernel_read_kernel_sysctls(perdition_t)
|
|
|
|
kernel_list_proc(perdition_t)
|
|
|
|
kernel_read_proc_symlinks(perdition_t)
|
|
|
|
|
|
|
|
corenet_all_recvfrom_netlabel(perdition_t)
|
|
|
|
corenet_tcp_sendrecv_generic_if(perdition_t)
|
|
|
|
corenet_tcp_sendrecv_generic_node(perdition_t)
|
|
|
|
corenet_tcp_bind_generic_node(perdition_t)
|
|
|
|
corenet_tcp_connect_pop_port(perdition_t)
|
|
|
|
corenet_sendrecv_pop_server_packets(perdition_t)
|
|
|
|
corenet_tcp_bind_pop_port(perdition_t)
|
|
|
|
corenet_tcp_connect_sieve_port(perdition_t)
|
|
|
|
corenet_sendrecv_sieve_server_packets(perdition_t)
|
|
|
|
corenet_tcp_bind_sieve_port(perdition_t)
|
|
|
|
|
|
|
|
dev_read_sysfs(perdition_t)
|
|
|
|
dev_read_urand(perdition_t)
|
|
|
|
|
|
|
|
domain_use_interactive_fds(perdition_t)
|
|
|
|
|
|
|
|
fs_getattr_all_fs(perdition_t)
|
|
|
|
fs_search_auto_mountpoints(perdition_t)
|
|
|
|
|
|
|
|
auth_use_nsswitch(perdition_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(perdition_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(perdition_t)
|
|
|
|
|
|
|
|
userdom_dontaudit_use_unpriv_user_fds(perdition_t)
|
|
|
|
userdom_dontaudit_search_user_home_dirs(perdition_t)
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
mysql_tcp_connect(perdition_t)
|
|
|
|
mysql_stream_connect(perdition_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
seutil_sigchld_newrole(perdition_t)
|
|
|
|
')
|
|
|
|
|