]> git.ipfire.org Git - people/stevee/selinux-policy.git/blob - policy/modules/services/tuned.te
fbaf9eabbb0f3a74cec085441c19bda98aeb82e0
[people/stevee/selinux-policy.git] / policy / modules / services / tuned.te
1
2 policy_module(tuned, 1.1.0)
3
4 ########################################
5 #
6 # Declarations
7 #
8
9 type tuned_t;
10 type tuned_exec_t;
11 init_daemon_domain(tuned_t, tuned_exec_t)
12
13 type tuned_initrc_exec_t;
14 init_script_file(tuned_initrc_exec_t)
15
16 type tuned_log_t;
17 logging_log_file(tuned_log_t)
18
19 type tuned_var_run_t;
20 files_pid_file(tuned_var_run_t)
21
22 ########################################
23 #
24 # tuned local policy
25 #
26
27 dontaudit tuned_t self:capability { dac_override sys_tty_config };
28
29 manage_dirs_pattern(tuned_t, tuned_log_t, tuned_log_t)
30 manage_files_pattern(tuned_t, tuned_log_t, tuned_log_t)
31 logging_log_filetrans(tuned_t, tuned_log_t, file)
32
33 manage_files_pattern(tuned_t, tuned_var_run_t, tuned_var_run_t)
34 files_pid_filetrans(tuned_t, tuned_var_run_t, file)
35
36 corecmd_exec_shell(tuned_t)
37 corecmd_exec_bin(tuned_t)
38
39 kernel_read_system_state(tuned_t)
40 kernel_read_network_state(tuned_t)
41
42 dev_read_urand(tuned_t)
43 dev_read_sysfs(tuned_t)
44 # to allow cpu tuning
45 dev_rw_netcontrol(tuned_t)
46
47 files_read_etc_files(tuned_t)
48 files_read_usr_files(tuned_t)
49 files_dontaudit_search_home(tuned_t)
50
51 logging_send_syslog_msg(tuned_t)
52
53 miscfiles_read_localization(tuned_t)
54
55 userdom_dontaudit_search_user_home_dirs(tuned_t)
56
57 # to allow disk tuning
58 optional_policy(`
59 fstools_domtrans(tuned_t)
60 ')
61
62 # to allow network interface tuning
63 optional_policy(`
64 sysnet_domtrans_ifconfig(tuned_t)
65 ')