aboutsummaryrefslogtreecommitdiff
blob: b1a6a48253c77c650907c9a89b508839dbbb191b (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
policy_module(wdmd, 1.4.0)

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

type wdmd_t;
type wdmd_exec_t;
init_daemon_domain(wdmd_t, wdmd_exec_t)

type wdmd_initrc_exec_t;
init_script_file(wdmd_initrc_exec_t)

type wdmd_tmpfs_t;
files_tmpfs_file(wdmd_tmpfs_t)

type wdmd_var_run_t;
files_pid_file(wdmd_var_run_t)

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

allow wdmd_t self:capability { chown ipc_lock sys_nice };
allow wdmd_t self:process { setsched signal };
allow wdmd_t self:fifo_file rw_fifo_file_perms;
allow wdmd_t self:unix_stream_socket { accept listen };

manage_dirs_pattern(wdmd_t, wdmd_var_run_t, wdmd_var_run_t)
manage_files_pattern(wdmd_t, wdmd_var_run_t, wdmd_var_run_t)
manage_sock_files_pattern(wdmd_t, wdmd_var_run_t, wdmd_var_run_t)
files_pid_filetrans(wdmd_t, wdmd_var_run_t, { file dir sock_file })

manage_dirs_pattern(wdmd_t, wdmd_tmpfs_t, wdmd_tmpfs_t)
manage_files_pattern(wdmd_t, wdmd_tmpfs_t, wdmd_tmpfs_t)
fs_tmpfs_filetrans(wdmd_t, wdmd_tmpfs_t, { dir file })

kernel_read_system_state(wdmd_t)

corecmd_exec_bin(wdmd_t)
corecmd_exec_shell(wdmd_t)

dev_read_watchdog(wdmd_t)
dev_write_watchdog(wdmd_t)

fs_read_anon_inodefs_files(wdmd_t)

auth_use_nsswitch(wdmd_t)

logging_send_syslog_msg(wdmd_t)

miscfiles_read_localization(wdmd_t)

optional_policy(`
	corosync_initrc_domtrans(wdmd_t)
	corosync_stream_connect(wdmd_t)
	corosync_rw_tmpfs(wdmd_t)
')