diff options
Diffstat (limited to 'policy/modules/services/redis.te')
-rw-r--r-- | policy/modules/services/redis.te | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/policy/modules/services/redis.te b/policy/modules/services/redis.te new file mode 100644 index 000000000..5e809cf69 --- /dev/null +++ b/policy/modules/services/redis.te @@ -0,0 +1,72 @@ +policy_module(redis, 1.5.1) + +######################################## +# +# Declarations +# + +type redis_t; +type redis_exec_t; +init_daemon_domain(redis_t, redis_exec_t) + +type redis_initrc_exec_t; +init_script_file(redis_initrc_exec_t) + +type redis_log_t; +logging_log_file(redis_log_t) + +type redis_var_lib_t; +files_type(redis_var_lib_t) + +type redis_var_run_t; +files_pid_file(redis_var_run_t) + +type redis_conf_t; +files_config_file(redis_conf_t) + +######################################## +# +# Local policy +# + +allow redis_t self:process { setrlimit signal_perms }; +allow redis_t self:fifo_file rw_fifo_file_perms; +allow redis_t self:unix_stream_socket create_stream_socket_perms; +allow redis_t self:tcp_socket create_stream_socket_perms; + +allow redis_t redis_conf_t:file rw_file_perms; + +manage_dirs_pattern(redis_t, redis_log_t, redis_log_t) +manage_files_pattern(redis_t, redis_log_t, redis_log_t) +manage_lnk_files_pattern(redis_t, redis_log_t, redis_log_t) +logging_log_filetrans(redis_t, redis_log_t, dir) + +manage_dirs_pattern(redis_t, redis_var_lib_t, redis_var_lib_t) +manage_files_pattern(redis_t, redis_var_lib_t, redis_var_lib_t) +manage_lnk_files_pattern(redis_t, redis_var_lib_t, redis_var_lib_t) + +manage_dirs_pattern(redis_t, redis_var_run_t, redis_var_run_t) +manage_files_pattern(redis_t, redis_var_run_t, redis_var_run_t) +manage_lnk_files_pattern(redis_t, redis_var_run_t, redis_var_run_t) + +kernel_read_system_state(redis_t) + +corenet_all_recvfrom_unlabeled(redis_t) +corenet_all_recvfrom_netlabel(redis_t) +corenet_tcp_sendrecv_generic_if(redis_t) +corenet_tcp_sendrecv_generic_node(redis_t) +corenet_tcp_bind_generic_node(redis_t) + +corenet_sendrecv_redis_server_packets(redis_t) +corenet_tcp_bind_redis_port(redis_t) +corenet_tcp_connect_redis_port(redis_t) +corenet_tcp_sendrecv_redis_port(redis_t) + +dev_read_sysfs(redis_t) +dev_read_urand(redis_t) + +logging_send_syslog_msg(redis_t) + +miscfiles_read_localization(redis_t) + +sysnet_dns_name_resolve(redis_t) |