aboutsummaryrefslogtreecommitdiff
blob: 3ac378f9d5b4c0f1e13737e65054304be9688444 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
policy_module(redis)

########################################
#
# Declarations
#

type redis_t;
type redis_exec_t;
init_daemon_domain(redis_t, redis_exec_t)

type redis_conf_t;
files_config_file(redis_conf_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_runtime_t alias redis_var_run_t;
files_runtime_file(redis_runtime_t)

type redis_var_lib_t;
files_type(redis_var_lib_t)

########################################
#
# Local policy
#

allow redis_t self:process { setrlimit signal_perms getsched };
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)
files_search_var_lib(redis_t)

manage_dirs_pattern(redis_t, redis_runtime_t, redis_runtime_t)
manage_files_pattern(redis_t, redis_runtime_t, redis_runtime_t)
manage_lnk_files_pattern(redis_t, redis_runtime_t, redis_runtime_t)
manage_sock_files_pattern(redis_t, redis_runtime_t, redis_runtime_t)
files_runtime_filetrans(redis_t, redis_runtime_t, { dir file lnk_file sock_file })

kernel_read_net_sysctls(redis_t)
kernel_read_system_state(redis_t)
kernel_read_vm_overcommit_sysctl(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)

dev_read_sysfs(redis_t)
dev_read_urand(redis_t)

logging_send_syslog_msg(redis_t)

miscfiles_read_generic_certs(redis_t)
miscfiles_read_localization(redis_t)

sysnet_dns_name_resolve(redis_t)