aboutsummaryrefslogtreecommitdiff
blob: 356f59249d530f64dd6c6beb093e723c7394483a (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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
## <summary>
##	Google Talk
## </summary>

#######################################
## <summary>
##	Execute Google talk plugin in the Google talk plugin domain
## </summary>
## <param name="domain">
##	<summary>
##	Domain allowed to transition
##	</summary>
## </param>
#
interface(`googletalk_domtrans_plugin',`
	gen_require(`
		type googletalk_plugin_t, googletalk_plugin_exec_t;
	')

	corecmd_search_bin($1)
	domtrans_pattern($1, googletalk_plugin_exec_t, googletalk_plugin_t)
')

#######################################
## <summary>
##	Execute Google talk plugin in the Google talk plugin domain,
##	and allow the specified role the google talk plugin domain.
## </summary>
## <param name="domain">
##	<summary>
##	Domain allowed to transition
##	</summary>
## </param>
## <param name="role">
##	<summary>
##	Role allowed access
##	</summary>
## </param>
#
interface(`googletalk_run_plugin',`
	gen_require(`
		type googletalk_plugin_t;
	')

	googletalk_domtrans_plugin($1)
	role $2 types googletalk_plugin_t;
')

########################################
## <summary>
##	Use the file descriptor of googletalk plugin
## </summary>
## <param name="domain">
##	<summary>
##	Domain allowed access
##	</summary>
## </param>
#
interface(`googletalk_use_plugin_fds',`
	gen_require(`
		type googletalk_plugin_t;
	')

	allow $1 googletalk_plugin_t:fd use;
')

########################################
## <summary>
##	Read and write to the google talk plugin inherited stream sockets
## </summary>
## <param name="domain">
##	<summary>
##	Domain allowed access
##	</summary>
## </param>
#
interface(`googletalk_rw_inherited_plugin_unix_stream_sockets',`
	gen_require(`
		type googletalk_plugin_t;
	')

	allow $1 googletalk_plugin_t:unix_stream_socket { read write };
')

########################################
## <summary>
##	Create objects in the xdg config home location
##	with an automatic type transition to the googletalk
##	plugin xdg config home type
## </summary>
## <param name="domain">
##	<summary>
##	Domain allowed access.
##	</summary>
## </param>
## <param name="object_class">
##	<summary>
##	The class of the object to be created.
##	</summary>
## </param>
## <param name="filename" optional="true">
##	<summary>
##	Name of the file or directory created
##	</summary>
## </param>
#
interface(`googletalk_generic_xdg_config_home_filetrans_plugin_xdg_config',`
	gen_require(`
		type googletalk_plugin_xdg_config_t;
	')

	xdg_config_home_filetrans($1, googletalk_plugin_xdg_config_t, $2, $3)
')

#######################################
## <summary>
##	Manage google talk plugin xdg configuration
## </summary>
## <param name="domain">
## 	<summary>
##	Domain allowed access
##	</summary>
## </param>
#
interface(`googletalk_manage_plugin_xdg_config',`
	gen_require(`
		type googletalk_plugin_xdg_config_t;
	')

	manage_dirs_pattern($1, googletalk_plugin_xdg_config_t, googletalk_plugin_xdg_config_t)
	manage_files_pattern($1, googletalk_plugin_xdg_config_t, googletalk_plugin_xdg_config_t)

	xdg_search_config_home_dirs($1)
')