forked from OwlCyberDefense/refpolicy-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfakehwclock.if
80 lines (70 loc) · 1.74 KB
/
fakehwclock.if
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
## <summary>fake-hwclock - Control fake hardware clock.</summary>
########################################
## <summary>
## Execute a domain transition to run fake-hwclock.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed to transition.
## </summary>
## </param>
#
interface(`fakehwclock_domtrans',`
refpolicywarn(`$0($*) has been deprecated')
gen_require(`
type fakehwclock_t, fakehwclock_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, fakehwclock_exec_t, fakehwclock_t)
')
########################################
## <summary>
## Execute fake-hwclock in the fake-hwclock domain,
## and allow the specified role
## the fake-hwclock domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed to transition.
## </summary>
## </param>
## <param name="role">
## <summary>
## Role allowed access.
## </summary>
## </param>
#
interface(`fakehwclock_run',`
refpolicywarn(`$0($*) has been deprecated')
gen_require(`
attribute_role fakehwclock_roles;
')
fakehwclock_domtrans($1)
roleattribute $2 fakehwclock_roles;
')
########################################
## <summary>
## All the rules required to
## administrate an fake-hwclock environment.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed to transition.
## </summary>
## </param>
## <param name="role">
## <summary>
## Role allowed access.
## </summary>
## </param>
#
interface(`fakehwclock_admin',`
gen_require(`
type fakehwclock_t, fakehwclock_exec_t, fakehwclock_backup_t;
type fakehwclock_initrc_exec_t, fakehwclock_unit_t;
')
admin_process_pattern($1, fakehwclock_t)
init_startstop_service($1, $2, fakehwclock_t, fakehwclock_initrc_exec_t, fakehwclock_unit_t)
files_search_etc($1)
admin_pattern($1, fakehwclock_backup_t)
')