aboutsummaryrefslogtreecommitdiff
blob: db9d2a594b531ef8569a3575a6d6c80216cd290d (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
policy_module(tuned, 1.1.0)

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

type tuned_t;
type tuned_exec_t;
init_daemon_domain(tuned_t, tuned_exec_t)

type tuned_initrc_exec_t;
init_script_file(tuned_initrc_exec_t)

type tuned_log_t;
logging_log_file(tuned_log_t)

type tuned_var_run_t;
files_pid_file(tuned_var_run_t)

########################################
#
# tuned local policy
#

dontaudit tuned_t self:capability { dac_override sys_tty_config };

manage_dirs_pattern(tuned_t, tuned_log_t, tuned_log_t)
manage_files_pattern(tuned_t, tuned_log_t, tuned_log_t)
logging_log_filetrans(tuned_t, tuned_log_t, file)

manage_files_pattern(tuned_t, tuned_var_run_t, tuned_var_run_t)
files_pid_filetrans(tuned_t, tuned_var_run_t, file)

corecmd_exec_shell(tuned_t)
corecmd_exec_bin(tuned_t)

kernel_read_system_state(tuned_t)
kernel_read_network_state(tuned_t)

dev_read_urand(tuned_t)
dev_read_sysfs(tuned_t)
# to allow cpu tuning
dev_rw_netcontrol(tuned_t)

files_read_etc_files(tuned_t)
files_read_usr_files(tuned_t)
files_dontaudit_search_home(tuned_t)

logging_send_syslog_msg(tuned_t)

miscfiles_read_localization(tuned_t)

userdom_dontaudit_search_user_home_dirs(tuned_t)

# to allow disk tuning
optional_policy(`
	fstools_domtrans(tuned_t)
')

# to allow network interface tuning
optional_policy(`
	sysnet_domtrans_ifconfig(tuned_t)
')