aboutsummaryrefslogtreecommitdiff
blob: a773824c3ac20928d192c0213a505b002560ccb8 (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
policy_module(fakehwclock, 1.2.0)

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

attribute_role fakehwclock_roles;

type fakehwclock_t;
type fakehwclock_exec_t;
init_system_domain(fakehwclock_t, fakehwclock_exec_t)
role fakehwclock_roles types fakehwclock_t;

type fakehwclock_backup_t;
files_type(fakehwclock_backup_t)

type fakehwclock_initrc_exec_t;
init_script_file(fakehwclock_initrc_exec_t)

type fakehwclock_unit_t;
init_unit_file(fakehwclock_unit_t)

########################################
#
# policy
#

# sys_time : set system time
allow fakehwclock_t self:capability sys_time;
allow fakehwclock_t self:fifo_file rw_fifo_file_perms;

allow fakehwclock_t fakehwclock_backup_t:file manage_file_perms;

corecmd_exec_bin(fakehwclock_t)
corecmd_exec_shell(fakehwclock_t)

miscfiles_read_localization(fakehwclock_t)

optional_policy(`
        cron_system_entry(fakehwclock_t, fakehwclock_exec_t)
')