82 lines
2.1 KiB
Plaintext
82 lines
2.1 KiB
Plaintext
policy_module(agrarian, 1.100.1)
|
|
|
|
########################################
|
|
#
|
|
# Declarations
|
|
#
|
|
|
|
type agrarian_t;
|
|
type agrarian_exec_t;
|
|
init_daemon_domain(agrarian_t, agrarian_exec_t)
|
|
|
|
permissive agrarian_t;
|
|
|
|
type agrarian_initrc_exec_t;
|
|
init_script_file(agrarian_initrc_exec_t)
|
|
|
|
type agrarian_conf_t;
|
|
files_type(agrarian_conf_t)
|
|
|
|
type agrarian_var_lib_t;
|
|
files_type(agrarian_var_lib_t)
|
|
|
|
type agrarian_var_run_t;
|
|
files_type(agrarian_var_run_t)
|
|
|
|
type agrarian_port_t;
|
|
corenet_port(agrarian_port_t)
|
|
|
|
########################################
|
|
#
|
|
# agrarian local policy
|
|
#
|
|
allow agrarian_t self:process { fork };
|
|
|
|
allow agrarian_t self:fifo_file rw_fifo_file_perms;
|
|
allow agrarian_t self:unix_stream_socket create_stream_socket_perms;
|
|
|
|
manage_dirs_pattern(agrarian_t, agrarian_conf_t, agrarian_conf_t)
|
|
manage_files_pattern(agrarian_t, agrarian_conf_t, agrarian_conf_t)
|
|
|
|
manage_dirs_pattern(agrarian_t, agrarian_var_lib_t, agrarian_var_lib_t)
|
|
manage_files_pattern(agrarian_t, agrarian_var_lib_t, agrarian_var_lib_t)
|
|
files_var_lib_filetrans(agrarian_t, agrarian_var_lib_t, { dir file })
|
|
|
|
manage_dirs_pattern(agrarian_t, agrarian_var_run_t, agrarian_var_run_t)
|
|
manage_files_pattern(agrarian_t, agrarian_var_run_t, agrarian_var_run_t)
|
|
|
|
sysnet_dns_name_resolve(agrarian_t)
|
|
corenet_all_recvfrom_unlabeled(agrarian_t)
|
|
|
|
allow agrarian_t self:tcp_socket create_stream_socket_perms;
|
|
corenet_tcp_sendrecv_generic_if(agrarian_t)
|
|
corenet_tcp_sendrecv_generic_node(agrarian_t)
|
|
corenet_tcp_sendrecv_all_ports(agrarian_t)
|
|
corenet_tcp_bind_generic_node(agrarian_t)
|
|
|
|
gen_require(`
|
|
type agrarian_port_t;
|
|
')
|
|
allow agrarian_t agrarian_port_t:tcp_socket name_bind;
|
|
|
|
gen_require(`
|
|
type agrarian_port_t;
|
|
')
|
|
allow agrarian_t agrarian_port_t:tcp_socket name_connect;
|
|
|
|
domain_use_interactive_fds(agrarian_t)
|
|
|
|
files_read_etc_files(agrarian_t)
|
|
|
|
miscfiles_read_localization(agrarian_t)
|
|
|
|
sysnet_dns_name_resolve(agrarian_t)
|
|
|
|
allow agrarian_t agrarian_exec_t:file execute_no_trans;
|
|
allow agrarian_t self:process setsched;
|
|
corecmd_exec_ls(agrarian_t)
|
|
corenet_tcp_connect_http_port(agrarian_t)
|
|
dev_read_urand(agrarian_t)
|
|
fs_getattr_xattr_fs(agrarian_t)
|
|
kernel_read_system_state(agrarian_t)
|