aboutsummaryrefslogtreecommitdiff
blob: bfdbe38831786c714d4027304090b2f2ed54a48f (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
77
78
79
80
81
82
83
84
85
86
87
policy_module(callweaver, 1.0.1)

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

type callweaver_t;
type callweaver_exec_t;
init_daemon_domain(callweaver_t, callweaver_exec_t)

type callweaver_initrc_exec_t;
init_script_file(callweaver_initrc_exec_t)

type callweaver_log_t;
logging_log_file(callweaver_log_t)

type callweaver_var_lib_t;
files_type(callweaver_var_lib_t)

type callweaver_var_run_t;
files_pid_file(callweaver_var_run_t)

type callweaver_spool_t;
files_type(callweaver_spool_t)

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

allow callweaver_t self:capability { setuid sys_nice setgid };
allow callweaver_t self:process { setsched signal };
allow callweaver_t self:fifo_file rw_fifo_file_perms;
allow callweaver_t self:tcp_socket { accept listen };
allow callweaver_t self:unix_stream_socket create_stream_socket_perms;

manage_dirs_pattern(callweaver_t, callweaver_log_t, callweaver_log_t)
append_files_pattern(callweaver_t, callweaver_log_t, callweaver_log_t)
create_files_pattern(callweaver_t, callweaver_log_t, callweaver_log_t)
setattr_files_pattern(callweaver_t, callweaver_log_t, callweaver_log_t)
logging_log_filetrans(callweaver_t, callweaver_log_t, { dir file })

manage_dirs_pattern(callweaver_t, callweaver_var_lib_t, callweaver_var_lib_t)
manage_files_pattern(callweaver_t, callweaver_var_lib_t, callweaver_var_lib_t)
files_var_lib_filetrans(callweaver_t, callweaver_var_lib_t, { dir file })

manage_dirs_pattern(callweaver_t, callweaver_var_run_t, callweaver_var_run_t)
manage_files_pattern(callweaver_t, callweaver_var_run_t, callweaver_var_run_t)
manage_sock_files_pattern(callweaver_t, callweaver_var_run_t, callweaver_var_run_t)
files_pid_filetrans(callweaver_t, callweaver_var_run_t, { dir file sock_file })

manage_dirs_pattern(callweaver_t, callweaver_spool_t, callweaver_spool_t)
manage_files_pattern(callweaver_t, callweaver_spool_t, callweaver_spool_t)
manage_lnk_files_pattern(callweaver_t, callweaver_spool_t, callweaver_spool_t)
files_spool_filetrans(callweaver_t, callweaver_spool_t, { dir file })

kernel_read_kernel_sysctls(callweaver_t)
kernel_read_sysctl(callweaver_t)

corenet_all_recvfrom_unlabeled(callweaver_t)
corenet_all_recvfrom_netlabel(callweaver_t)
corenet_udp_sendrecv_generic_if(callweaver_t)
corenet_udp_sendrecv_generic_node(callweaver_t)
corenet_udp_sendrecv_all_ports(callweaver_t)
corenet_udp_bind_generic_node(callweaver_t)

corenet_sendrecv_asterisk_server_packets(callweaver_t)
corenet_udp_bind_asterisk_port(callweaver_t)

corenet_sendrecv_generic_server_packets(callweaver_t)
corenet_udp_bind_generic_port(callweaver_t)

corenet_sendrecv_sip_server_packets(callweaver_t)
corenet_udp_bind_sip_port(callweaver_t)

dev_manage_generic_symlinks(callweaver_t)

domain_use_interactive_fds(callweaver_t)

term_getattr_pty_fs(callweaver_t)
term_use_generic_ptys(callweaver_t)
term_use_ptmx(callweaver_t)

auth_use_nsswitch(callweaver_t)

miscfiles_read_localization(callweaver_t)