1 |
commit: 75ce5057c2fb4afcafb110d6aadd2d80c1aec174 |
2 |
Author: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be> |
3 |
AuthorDate: Sun Mar 30 11:02:04 2014 +0000 |
4 |
Commit: Sven Vermeulen <swift <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Mar 30 11:02:04 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=75ce5057 |
7 |
|
8 |
Move alsa_domain calls into USE triggered definition |
9 |
|
10 |
--- |
11 |
policy/modules/contrib/chromium.te | 10 ++++++---- |
12 |
policy/modules/contrib/googletalk.te | 10 ++++++---- |
13 |
policy/modules/contrib/java.te | 11 ++++++----- |
14 |
policy/modules/contrib/mozilla.te | 26 +++++++++++++------------- |
15 |
policy/modules/contrib/mplayer.te | 8 +++++--- |
16 |
policy/modules/contrib/skype.te | 10 ++++++---- |
17 |
6 files changed, 42 insertions(+), 33 deletions(-) |
18 |
|
19 |
diff --git a/policy/modules/contrib/chromium.te b/policy/modules/contrib/chromium.te |
20 |
index 3585ae8..9e06778 100644 |
21 |
--- a/policy/modules/contrib/chromium.te |
22 |
+++ b/policy/modules/contrib/chromium.te |
23 |
@@ -184,10 +184,6 @@ tunable_policy(`chromium_read_system_info',` |
24 |
') |
25 |
|
26 |
optional_policy(` |
27 |
- alsa_domain(chromium_t, chromium_tmpfs_t) |
28 |
-') |
29 |
- |
30 |
-optional_policy(` |
31 |
cups_read_config(chromium_t) |
32 |
cups_stream_connect(chromium_t) |
33 |
') |
34 |
@@ -219,6 +215,12 @@ optional_policy(` |
35 |
mozilla_read_user_home(chromium_t) |
36 |
') |
37 |
|
38 |
+ifdef(`use_alsa',` |
39 |
+ optional_policy(` |
40 |
+ alsa_domain(chromium_t, chromium_tmpfs_t) |
41 |
+ ') |
42 |
+') |
43 |
+ |
44 |
######################################## |
45 |
# |
46 |
# chromium_renderer local policy |
47 |
|
48 |
diff --git a/policy/modules/contrib/googletalk.te b/policy/modules/contrib/googletalk.te |
49 |
index 5a71f60..0736a7a 100644 |
50 |
--- a/policy/modules/contrib/googletalk.te |
51 |
+++ b/policy/modules/contrib/googletalk.te |
52 |
@@ -80,10 +80,6 @@ userdom_use_user_terminals(googletalk_plugin_t) |
53 |
googletalk_generic_xdg_config_home_filetrans_plugin_xdg_config(googletalk_plugin_t, dir, "google-googletalkplugin") |
54 |
|
55 |
optional_policy(` |
56 |
- alsa_domain(googletalk_plugin_t, googletalk_plugin_tmpfs_t) |
57 |
-') |
58 |
- |
59 |
-optional_policy(` |
60 |
dbus_system_bus_client(googletalk_plugin_t) |
61 |
') |
62 |
|
63 |
@@ -99,3 +95,9 @@ optional_policy(` |
64 |
optional_policy(` |
65 |
xserver_user_x_domain_template(googletalk_plugin, googletalk_plugin_t, googletalk_plugin_tmpfs_t) |
66 |
') |
67 |
+ |
68 |
+ifdef(`use_alsa',` |
69 |
+ optional_policy(` |
70 |
+ alsa_domain(googletalk_plugin_t, googletalk_plugin_tmpfs_t) |
71 |
+ ') |
72 |
+') |
73 |
|
74 |
diff --git a/policy/modules/contrib/java.te b/policy/modules/contrib/java.te |
75 |
index d131c8b..8503180 100644 |
76 |
--- a/policy/modules/contrib/java.te |
77 |
+++ b/policy/modules/contrib/java.te |
78 |
@@ -142,11 +142,6 @@ ifdef(`distro_gentoo',` |
79 |
userdom_use_user_terminals(java_t) |
80 |
|
81 |
optional_policy(` |
82 |
- alsa_domain(java_t, java_tmpfs_t) |
83 |
- alsa_read_rw_config(java_t) |
84 |
- ') |
85 |
- |
86 |
- optional_policy(` |
87 |
# Plugin communication |
88 |
chromium_rw_tmp_pipes(java_t) |
89 |
') |
90 |
@@ -155,6 +150,12 @@ ifdef(`distro_gentoo',` |
91 |
# Plugin communication |
92 |
mozilla_rw_tmp_pipes(java_t) |
93 |
') |
94 |
+ |
95 |
+ ifdef(`use_alsa',` |
96 |
+ optional_policy(` |
97 |
+ alsa_domain(java_t, java_tmpfs_t) |
98 |
+ ') |
99 |
+ ') |
100 |
') |
101 |
|
102 |
optional_policy(` |
103 |
|
104 |
diff --git a/policy/modules/contrib/mozilla.te b/policy/modules/contrib/mozilla.te |
105 |
index b8d8c30..87728ae 100644 |
106 |
--- a/policy/modules/contrib/mozilla.te |
107 |
+++ b/policy/modules/contrib/mozilla.te |
108 |
@@ -690,13 +690,6 @@ gen_tunable(mozilla_plugin_connect_all_unreserved, false) |
109 |
') |
110 |
') |
111 |
|
112 |
- ifdef(`use_alsa',` |
113 |
- optional_policy(` |
114 |
- # HTML5 support is built-in (no plugin) - bug 464398 |
115 |
- alsa_domain(mozilla_t, mozilla_tmpfs_t) |
116 |
- ') |
117 |
- ') |
118 |
- |
119 |
optional_policy(` |
120 |
nscd_socket_use(mozilla_t) |
121 |
') |
122 |
@@ -705,6 +698,13 @@ gen_tunable(mozilla_plugin_connect_all_unreserved, false) |
123 |
pulseaudio_client_domain(mozilla_t, mozilla_tmpfs_t) |
124 |
') |
125 |
|
126 |
+ ifdef(`use_alsa',` |
127 |
+ optional_policy(` |
128 |
+ # HTML5 support is built-in (no plugin) - bug 464398 |
129 |
+ alsa_domain(mozilla_t, mozilla_tmpfs_t) |
130 |
+ ') |
131 |
+ ') |
132 |
+ |
133 |
########################### |
134 |
# |
135 |
# Mozilla plugin policy |
136 |
@@ -740,12 +740,6 @@ gen_tunable(mozilla_plugin_connect_all_unreserved, false) |
137 |
corenet_dontaudit_tcp_connect_all_unreserved_ports(mozilla_plugin_t) |
138 |
') |
139 |
|
140 |
- ifdef(`use_alsa',` |
141 |
- optional_policy(` |
142 |
- alsa_domain(mozilla_plugin_t, mozilla_plugin_tmpfs_t) |
143 |
- ') |
144 |
- ') |
145 |
- |
146 |
optional_policy(` |
147 |
flash_manage_home(mozilla_plugin_t) |
148 |
') |
149 |
@@ -761,4 +755,10 @@ gen_tunable(mozilla_plugin_connect_all_unreserved, false) |
150 |
optional_policy(` |
151 |
pulseaudio_client_domain(mozilla_plugin_t, mozilla_plugin_tmpfs_t) |
152 |
') |
153 |
+ |
154 |
+ ifdef(`use_alsa',` |
155 |
+ optional_policy(` |
156 |
+ alsa_domain(mozilla_plugin_t, mozilla_plugin_tmpfs_t) |
157 |
+ ') |
158 |
+ ') |
159 |
') |
160 |
|
161 |
diff --git a/policy/modules/contrib/mplayer.te b/policy/modules/contrib/mplayer.te |
162 |
index 5378660..5ebba47 100644 |
163 |
--- a/policy/modules/contrib/mplayer.te |
164 |
+++ b/policy/modules/contrib/mplayer.te |
165 |
@@ -288,10 +288,12 @@ ifdef(`distro_gentoo',` |
166 |
') |
167 |
|
168 |
optional_policy(` |
169 |
- alsa_domain(mplayer_t, mplayer_tmpfs_t) |
170 |
+ pulseaudio_client_domain(mplayer_t, mplayer_tmpfs_t) |
171 |
') |
172 |
|
173 |
- optional_policy(` |
174 |
- pulseaudio_client_domain(mplayer_t, mplayer_tmpfs_t) |
175 |
+ ifdef(`use_alsa',` |
176 |
+ optional_policy(` |
177 |
+ alsa_domain(mplayer_t, mplayer_tmpfs_t) |
178 |
+ ') |
179 |
') |
180 |
') |
181 |
|
182 |
diff --git a/policy/modules/contrib/skype.te b/policy/modules/contrib/skype.te |
183 |
index 6b4ca34..4c71730 100644 |
184 |
--- a/policy/modules/contrib/skype.te |
185 |
+++ b/policy/modules/contrib/skype.te |
186 |
@@ -112,10 +112,6 @@ tunable_policy(`skype_manage_user_content',` |
187 |
') |
188 |
|
189 |
optional_policy(` |
190 |
- alsa_domain(skype_t, skype_tmpfs_t) |
191 |
-') |
192 |
- |
193 |
-optional_policy(` |
194 |
dbus_system_bus_client(skype_t) |
195 |
dbus_all_session_bus_client(skype_t) |
196 |
') |
197 |
@@ -123,3 +119,9 @@ optional_policy(` |
198 |
optional_policy(` |
199 |
xdg_manage_config_home(skype_t) |
200 |
') |
201 |
+ |
202 |
+ifdef(`use_alsa',` |
203 |
+ optional_policy(` |
204 |
+ alsa_domain(skype_t, skype_tmpfs_t) |
205 |
+ ') |
206 |
+') |