aboutsummaryrefslogtreecommitdiff
blob: ba7c8c8867db026e1cc6116ef8cabde0572a8ca1 (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
## <summary>Yum/Apt Mirroring.</summary>

########################################
## <summary>
##	Execute yam in the yam domain.
## </summary>
## <param name="domain">
##	<summary>
##	Domain allowed to transition.
##	</summary>
## </param>
#
interface(`yam_domtrans',`
	gen_require(`
		type yam_t, yam_exec_t;
	')

	corecmd_search_bin($1)
	domtrans_pattern($1, yam_exec_t, yam_t)
')

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

	yam_domtrans($1)
	roleattribute $2 yam_roles;
')

########################################
## <summary>
##	Read yam content.
## </summary>
## <param name="domain">
##	<summary>
##	Domain allowed access.
##	</summary>
## </param>
#
interface(`yam_read_content',`
	gen_require(`
		type yam_content_t;
	')

	allow $1 yam_content_t:dir list_dir_perms;
	read_files_pattern($1, yam_content_t, yam_content_t)
	read_lnk_files_pattern($1, yam_content_t, yam_content_t)
')