aboutsummaryrefslogtreecommitdiff
blob: bbd9d64bf6e6d52104f8d75c991509962fdc4213 (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
policy_module(clock, 1.10.0)

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

type adjtime_t;
files_type(adjtime_t)

type hwclock_t;
type hwclock_exec_t;
init_system_domain(hwclock_t, hwclock_exec_t)
role system_r types hwclock_t;

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

# Give hwclock the capabilities it requires.  dac_override is a surprise,
# but hwclock does require it.
allow hwclock_t self:capability { dac_override sys_rawio sys_time sys_tty_config };
dontaudit hwclock_t self:capability sys_tty_config;
allow hwclock_t self:process signal_perms;
allow hwclock_t self:fifo_file rw_fifo_file_perms;

# Allow hwclock to store & retrieve correction factors.
allow hwclock_t adjtime_t:file { rw_file_perms setattr };

kernel_read_kernel_sysctls(hwclock_t)
kernel_read_system_state(hwclock_t)
# for when /usr is not mounted:
kernel_dontaudit_search_unlabeled(hwclock_t)

corecmd_exec_bin(hwclock_t)
corecmd_exec_shell(hwclock_t)

dev_read_sysfs(hwclock_t)
dev_rw_realtime_clock(hwclock_t)

files_read_etc_files(hwclock_t)

fs_getattr_xattr_fs(hwclock_t)
fs_search_auto_mountpoints(hwclock_t)

term_dontaudit_use_console(hwclock_t)
term_use_unallocated_ttys(hwclock_t)
term_use_all_ttys(hwclock_t)
term_use_all_ptys(hwclock_t)

domain_use_interactive_fds(hwclock_t)

init_use_fds(hwclock_t)
init_use_script_ptys(hwclock_t)

logging_send_audit_msgs(hwclock_t)
logging_send_syslog_msg(hwclock_t)

miscfiles_read_localization(hwclock_t)

optional_policy(`
	acpi_append_log(hwclock_t)
	acpi_rw_stream_sockets(hwclock_t)
')

optional_policy(`
	nscd_use(hwclock_t)
')

optional_policy(`
	seutil_sigchld_newrole(hwclock_t)
')

optional_policy(`
	udev_read_db(hwclock_t)
')

optional_policy(`
	userdom_dontaudit_use_unpriv_user_fds(hwclock_t)
')