aboutsummaryrefslogtreecommitdiff
blob: f52a9a4f84d243478afdb4effb27518a6a9ac43f (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
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
policy_module(ctdb, 1.5.0)

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

type ctdbd_t;
type ctdbd_exec_t;
init_daemon_domain(ctdbd_t, ctdbd_exec_t)

type ctdbd_initrc_exec_t;
init_script_file(ctdbd_initrc_exec_t)

type ctdbd_log_t;
logging_log_file(ctdbd_log_t)

type ctdbd_spool_t;
files_type(ctdbd_spool_t)

type ctdbd_tmp_t;
files_tmp_file(ctdbd_tmp_t)

type ctdbd_var_lib_t;
files_type(ctdbd_var_lib_t)

type ctdbd_var_run_t;
files_pid_file(ctdbd_var_run_t)

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

allow ctdbd_t self:capability { chown ipc_lock net_admin net_raw sys_nice };
allow ctdbd_t self:process { setpgid signal_perms setsched };
allow ctdbd_t self:fifo_file rw_fifo_file_perms;
allow ctdbd_t self:unix_stream_socket { accept connectto listen };
allow ctdbd_t self:netlink_route_socket r_netlink_socket_perms;
allow ctdbd_t self:packet_socket create_socket_perms;
allow ctdbd_t self:tcp_socket create_stream_socket_perms;

append_files_pattern(ctdbd_t, ctdbd_log_t, ctdbd_log_t)
create_files_pattern(ctdbd_t, ctdbd_log_t, ctdbd_log_t)
setattr_files_pattern(ctdbd_t, ctdbd_log_t, ctdbd_log_t)
logging_log_filetrans(ctdbd_t, ctdbd_log_t, file)

manage_files_pattern(ctdbd_t, ctdbd_tmp_t, ctdbd_tmp_t)
manage_sock_files_pattern(ctdbd_t, ctdbd_tmp_t, ctdbd_tmp_t)
files_tmp_filetrans(ctdbd_t, ctdbd_tmp_t, { file sock_file })

manage_dirs_pattern(ctdbd_t, ctdbd_spool_t, ctdbd_spool_t)
manage_files_pattern(ctdbd_t, ctdbd_spool_t, ctdbd_spool_t)
manage_lnk_files_pattern(ctdbd_t, ctdbd_spool_t, ctdbd_spool_t)
files_spool_filetrans(ctdbd_t, ctdbd_spool_t, dir)

exec_files_pattern(ctdbd_t, ctdbd_var_lib_t, ctdbd_var_lib_t)
manage_dirs_pattern(ctdbd_t, ctdbd_var_lib_t, ctdbd_var_lib_t)
manage_files_pattern(ctdbd_t, ctdbd_var_lib_t, ctdbd_var_lib_t)
files_var_lib_filetrans(ctdbd_t, ctdbd_var_lib_t, dir)

manage_dirs_pattern(ctdbd_t, ctdbd_var_run_t, ctdbd_var_run_t)
manage_files_pattern(ctdbd_t, ctdbd_var_run_t, ctdbd_var_run_t)
files_pid_filetrans(ctdbd_t, ctdbd_var_run_t, dir)

kernel_read_network_state(ctdbd_t)
kernel_read_system_state(ctdbd_t)
kernel_rw_net_sysctls(ctdbd_t)

corenet_all_recvfrom_unlabeled(ctdbd_t)
corenet_all_recvfrom_netlabel(ctdbd_t)
corenet_tcp_sendrecv_generic_if(ctdbd_t)
corenet_tcp_sendrecv_generic_node(ctdbd_t)
corenet_tcp_bind_generic_node(ctdbd_t)

corenet_sendrecv_ctdb_server_packets(ctdbd_t)
corenet_tcp_bind_ctdb_port(ctdbd_t)
corenet_tcp_sendrecv_ctdb_port(ctdbd_t)

corecmd_exec_bin(ctdbd_t)
corecmd_exec_shell(ctdbd_t)

dev_read_sysfs(ctdbd_t)
dev_read_urand(ctdbd_t)

domain_dontaudit_read_all_domains_state(ctdbd_t)

files_read_etc_files(ctdbd_t)
files_search_all_mountpoints(ctdbd_t)

fs_getattr_all_fs(ctdbd_t)

logging_send_syslog_msg(ctdbd_t)

miscfiles_read_localization(ctdbd_t)
miscfiles_read_public_files(ctdbd_t)

optional_policy(`
	consoletype_exec(ctdbd_t)
')

optional_policy(`
	hostname_exec(ctdbd_t)
')

optional_policy(`
	iptables_domtrans(ctdbd_t)
')

optional_policy(`
	samba_initrc_domtrans(ctdbd_t)
	samba_domtrans_net(ctdbd_t)
	samba_rw_var_files(ctdbd_t)
')

optional_policy(`
	sysnet_domtrans_ifconfig(ctdbd_t)
')