From: Fabrice Fontaine Date: Fri, 30 Jul 2021 07:23:23 +0000 (+0200) Subject: package/refpolicy: fix build with minidlna X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dd1ed4e366e2ff76c37c31e8a2af0129d10fbb63;p=buildroot.git package/refpolicy: fix build with minidlna Fix build failure with minidlna raised since commit e3c31814adaa3e773c310cd97e28ffea9b980a10 Fixes: - http://autobuild.buildroot.org/results/52490172afd9b72b08a7deb0bd3c2124398bbffa Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- diff --git a/package/refpolicy/0001-policy-modules-services-minidlna.te-make-xdg-optiona.patch b/package/refpolicy/0001-policy-modules-services-minidlna.te-make-xdg-optiona.patch new file mode 100644 index 0000000000..c4e98ad141 --- /dev/null +++ b/package/refpolicy/0001-policy-modules-services-minidlna.te-make-xdg-optiona.patch @@ -0,0 +1,52 @@ +From 65c87bdfb1c895934582988f03f1c9c452c1426b Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sun, 25 Jul 2021 17:59:15 +0200 +Subject: [PATCH] policy/modules/services/minidlna.te: make xdg optional + +Make xdg optional to avoid the following build failure: + + Compiling targeted policy.28 + 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 + policy/modules/services/minidlna.te:85:ERROR 'unknown type xdg_music_t' at token ';' on line 146109: + #line 85 + allow minidlna_t xdg_music_t:dir { getattr search open }; + checkpolicy: error(s) encountered while parsing configuration + Rules.monolithic:78: recipe for target 'policy.28' failed + +Fixes: + - http://autobuild.buildroot.org/results/52490172afd9b72b08a7deb0bd3c2124398bbffa/build-end.log + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/SELinuxProject/refpolicy/pull/396] +--- + policy/modules/services/minidlna.te | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/policy/modules/services/minidlna.te b/policy/modules/services/minidlna.te +index b980d2707..4d87e8ee7 100644 +--- a/policy/modules/services/minidlna.te ++++ b/policy/modules/services/minidlna.te +@@ -82,10 +82,6 @@ logging_search_logs(minidlna_t) + miscfiles_read_localization(minidlna_t) + miscfiles_read_public_files(minidlna_t) + +-xdg_read_music(minidlna_t) +-xdg_read_pictures(minidlna_t) +-xdg_read_videos(minidlna_t) +- + tunable_policy(`minidlna_read_generic_user_content',` + userdom_list_user_tmp(minidlna_t) + userdom_read_user_home_content_files(minidlna_t) +@@ -101,3 +97,9 @@ tunable_policy(`minidlna_read_generic_user_content',` + userdom_dontaudit_read_user_home_content_files(minidlna_t) + userdom_dontaudit_read_user_tmp_files(minidlna_t) + ') ++ ++optional_policy(` ++ xdg_read_music(minidlna_t) ++ xdg_read_pictures(minidlna_t) ++ xdg_read_videos(minidlna_t) ++') +-- +2.30.2 +