aboutsummaryrefslogtreecommitdiff
blob: ae29d9f60df3d4b1c217001279b6e76f6ac02d4a (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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
## <summary>Livecd tool for building alternate livecd for different os and policy versions.</summary>

########################################
## <summary>
##	Execute a domain transition to run livecd.
## </summary>
## <param name="domain">
## <summary>
##	Domain allowed to transition.
## </summary>
## </param>
#
interface(`livecd_domtrans',`
	gen_require(`
		type livecd_t, livecd_exec_t;
	')

	domtrans_pattern($1, livecd_exec_t, livecd_t)
')

########################################
## <summary>
##	Execute livecd in the livecd domain, and
##	allow the specified role the livecd domain.
## </summary>
## <param name="domain">
##	<summary>
##	Domain allowed to transition.
##	</summary>
## </param>
## <param name="role">
##	<summary>
##	Role allowed access.
##	</summary>
## </param>
#
interface(`livecd_run',`
	gen_require(`
		attribute_role livecd_roles;
	')

	livecd_domtrans($1)
	roleattribute $2 livecd_roles;
')

########################################
## <summary>
##	Read livecd temporary files.
## </summary>
## <param name="domain">
##	<summary>
##	Domain allowed access.
##	</summary>
## </param>
#
interface(`livecd_read_tmp_files',`
	gen_require(`
		type livecd_tmp_t;
	')

	files_search_tmp($1)
	read_files_pattern($1, livecd_tmp_t, livecd_tmp_t)
')

########################################
## <summary>
##	Read and write livecd temporary files.
## </summary>
## <param name="domain">
##	<summary>
##	Domain allowed access.
##	</summary>
## </param>
#
interface(`livecd_rw_tmp_files',`
	gen_require(`
		type livecd_tmp_t;
	')

	files_search_tmp($1)
	rw_files_pattern($1, livecd_tmp_t, livecd_tmp_t)
')

########################################
## <summary>
##	Allow read and write access to livecd semaphores.
## </summary>
## <param name="domain">
##	<summary>
##	Domain allowed access.
##	</summary>
## </param>
#
interface(`livecd_rw_semaphores',`
	gen_require(`
		type livecd_t;
	')

	allow $1 livecd_t:sem { unix_read unix_write associate read write };
')