1 |
commit: 6dcf394fe72ea7bc72c4ec5936be1f17d463f241 |
2 |
Author: Fabrice Fontaine <fontaine.fabrice <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun Jul 25 15:59:15 2021 +0000 |
4 |
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 5 14:26:44 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=6dcf394f |
7 |
|
8 |
policy/modules/services/minidlna.te: make xdg optional |
9 |
|
10 |
Make xdg optional to avoid the following build failure: |
11 |
|
12 |
Compiling targeted policy.28 |
13 |
env LD_LIBRARY_PATH="/home/buildroot/autobuild/instance-1/output-1/host/lib:/home/buildroot/autobuild/instance-1/output-1/host/usr/lib" /home/buildroot/autobuild/instance-1/output-1/host/usr/bin/checkpolicy -c 28 -U deny -S -O -E policy.conf -o policy.28 |
14 |
policy/modules/services/minidlna.te:85:ERROR 'unknown type xdg_music_t' at token ';' on line 146109: |
15 |
#line 85 |
16 |
allow minidlna_t xdg_music_t:dir { getattr search open }; |
17 |
checkpolicy: error(s) encountered while parsing configuration |
18 |
Rules.monolithic:78: recipe for target 'policy.28' failed |
19 |
|
20 |
Fixes: |
21 |
- http://autobuild.buildroot.org/results/52490172afd9b72b08a7deb0bd3c2124398bbffa/build-end.log |
22 |
|
23 |
Signed-off-by: Fabrice Fontaine <fontaine.fabrice <AT> gmail.com> |
24 |
Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org> |
25 |
|
26 |
policy/modules/services/minidlna.te | 10 ++++++---- |
27 |
1 file changed, 6 insertions(+), 4 deletions(-) |
28 |
|
29 |
diff --git a/policy/modules/services/minidlna.te b/policy/modules/services/minidlna.te |
30 |
index b980d270..4d87e8ee 100644 |
31 |
--- a/policy/modules/services/minidlna.te |
32 |
+++ b/policy/modules/services/minidlna.te |
33 |
@@ -82,10 +82,6 @@ logging_search_logs(minidlna_t) |
34 |
miscfiles_read_localization(minidlna_t) |
35 |
miscfiles_read_public_files(minidlna_t) |
36 |
|
37 |
-xdg_read_music(minidlna_t) |
38 |
-xdg_read_pictures(minidlna_t) |
39 |
-xdg_read_videos(minidlna_t) |
40 |
- |
41 |
tunable_policy(`minidlna_read_generic_user_content',` |
42 |
userdom_list_user_tmp(minidlna_t) |
43 |
userdom_read_user_home_content_files(minidlna_t) |
44 |
@@ -101,3 +97,9 @@ tunable_policy(`minidlna_read_generic_user_content',` |
45 |
userdom_dontaudit_read_user_home_content_files(minidlna_t) |
46 |
userdom_dontaudit_read_user_tmp_files(minidlna_t) |
47 |
') |
48 |
+ |
49 |
+optional_policy(` |
50 |
+ xdg_read_music(minidlna_t) |
51 |
+ xdg_read_pictures(minidlna_t) |
52 |
+ xdg_read_videos(minidlna_t) |
53 |
+') |