forked from OwlCyberDefense/refpolicy-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bacula.te
158 lines (114 loc) · 4.15 KB
/
bacula.te
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
policy_module(bacula, 1.3.0)
########################################
#
# Declarations
#
attribute_role bacula_admin_roles;
type bacula_t;
type bacula_exec_t;
init_daemon_domain(bacula_t, bacula_exec_t)
type bacula_initrc_exec_t;
init_script_file(bacula_initrc_exec_t)
type bacula_etc_t;
files_type(bacula_etc_t)
type bacula_log_t;
logging_log_file(bacula_log_t)
type bacula_spool_t;
files_type(bacula_spool_t)
type bacula_store_t;
files_type(bacula_store_t)
files_mountpoint(bacula_store_t)
type bacula_var_lib_t;
files_type(bacula_var_lib_t)
type bacula_var_run_t;
files_pid_file(bacula_var_run_t)
type bacula_admin_t;
type bacula_admin_exec_t;
application_domain(bacula_admin_t, bacula_admin_exec_t)
role bacula_admin_roles types bacula_admin_t;
########################################
#
# Local policy
#
allow bacula_t self:capability { dac_read_search dac_override chown fowner fsetid};
allow bacula_t self:process signal;
allow bacula_t self:fifo_file rw_fifo_file_perms;
allow bacula_t self:tcp_socket { accept listen };
read_files_pattern(bacula_t, bacula_etc_t, bacula_etc_t)
append_files_pattern(bacula_t, bacula_log_t, bacula_log_t)
create_files_pattern(bacula_t, bacula_log_t, bacula_log_t)
setattr_files_pattern(bacula_t, bacula_log_t, bacula_log_t)
manage_dirs_pattern(bacula_t, bacula_spool_t, bacula_spool_t)
manage_files_pattern(bacula_t, bacula_spool_t, bacula_spool_t)
manage_files_pattern(bacula_t, bacula_store_t, bacula_store_t)
manage_lnk_files_pattern(bacula_t, bacula_store_t, bacula_store_t)
manage_dirs_pattern(bacula_t, bacula_store_t, bacula_store_t)
manage_dirs_pattern(bacula_t, bacula_var_lib_t, bacula_var_lib_t)
manage_files_pattern(bacula_t, bacula_var_lib_t, bacula_var_lib_t)
files_var_lib_filetrans(bacula_t, bacula_var_lib_t, dir)
allow bacula_t bacula_var_run_t:file manage_file_perms;
files_pid_filetrans(bacula_t, bacula_var_run_t, file)
kernel_read_kernel_sysctls(bacula_t)
kernel_read_system_state(bacula_t)
corecmd_exec_bin(bacula_t)
corecmd_exec_shell(bacula_t)
corenet_all_recvfrom_unlabeled(bacula_t)
corenet_all_recvfrom_netlabel(bacula_t)
corenet_tcp_sendrecv_generic_if(bacula_t)
corenet_udp_sendrecv_generic_if(bacula_t)
corenet_tcp_sendrecv_generic_node(bacula_t)
corenet_udp_sendrecv_generic_node(bacula_t)
corenet_tcp_sendrecv_all_ports(bacula_t)
corenet_udp_sendrecv_all_ports(bacula_t)
corenet_tcp_bind_generic_node(bacula_t)
corenet_udp_bind_generic_node(bacula_t)
corenet_sendrecv_generic_server_packets(bacula_t)
corenet_udp_bind_generic_port(bacula_t)
corenet_sendrecv_hplip_server_packets(bacula_t)
corenet_tcp_bind_hplip_port(bacula_t)
corenet_udp_bind_hplip_port(bacula_t)
corenet_sendrecv_all_client_packets(bacula_t)
corenet_tcp_connect_all_ports(bacula_t)
dev_getattr_all_blk_files(bacula_t)
dev_getattr_all_chr_files(bacula_t)
files_dontaudit_getattr_all_sockets(bacula_t)
files_read_all_files(bacula_t)
files_read_all_symlinks(bacula_t)
fs_getattr_xattr_fs(bacula_t)
fs_list_all(bacula_t)
auth_read_shadow(bacula_t)
logging_send_syslog_msg(bacula_t)
sysnet_dns_name_resolve(bacula_t)
optional_policy(`
mysql_stream_connect(bacula_t)
mysql_tcp_connect(bacula_t)
')
optional_policy(`
nis_use_ypbind(bacula_t)
')
optional_policy(`
sysnet_use_ldap(bacula_t)
ldap_stream_connect(bacula_t)
')
########################################
#
# Client local policy
#
allow bacula_admin_t self:process signal;
allow bacula_admin_t self:tcp_socket { accept listen };
allow bacula_admin_t self:dgram_socket_class_set create_socket_perms;
read_files_pattern(bacula_admin_t, bacula_etc_t, bacula_etc_t)
corenet_all_recvfrom_unlabeled(bacula_admin_t)
corenet_all_recvfrom_netlabel(bacula_admin_t)
corenet_tcp_sendrecv_generic_if(bacula_admin_t)
corenet_tcp_sendrecv_generic_node(bacula_admin_t)
corenet_tcp_sendrecv_all_ports(bacula_admin_t)
corenet_tcp_bind_generic_node(bacula_admin_t)
corenet_sendrecv_hplip_client_packets(bacula_admin_t)
corenet_tcp_connect_hplip_port(bacula_admin_t)
domain_use_interactive_fds(bacula_admin_t)
files_read_etc_files(bacula_admin_t)
miscfiles_read_localization(bacula_admin_t)
sysnet_dns_name_resolve(bacula_admin_t)
userdom_dontaudit_search_user_home_dirs(bacula_admin_t)
userdom_use_user_ptys(bacula_admin_t)