[Buildroot] [PATCH 1/1] package/refpolicy: fix build with wireshark

Fabrice Fontaine fontaine.fabrice at gmail.com
Sun Sep 5 16:58:39 UTC 2021


Fix the following build failure with wireshark raised since commit
975ab2fa88a0c94b362499ea8ad99222f335fb45:

 Compiling targeted policy.31
 env LD_LIBRARY_PATH="/tmp/instance-0/output-1/host/lib:/tmp/instance-0/output-1/host/usr/lib" /tmp/instance-0/output-1/host/usr/bin/checkpolicy -c 31 -U deny -S -O -E policy.conf -o policy.31
 policy/modules/apps/wireshark.te:96:ERROR 'unknown type xdg_downloads_t' at token ';' on line 645315:
 #line 96
	allow wireshark_t xdg_downloads_t:dir { getattr search open };
 checkpolicy:  error(s) encountered while parsing configuration
 make[1]: *** [Rules.monolithic:79: policy.31] Error 1

Fixes:
 - http://autobuild.buildroot.org/results/dfbc667e0c17072ddab89a03244f572d5234da50

Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
---
 ...-apps-wireshark.te-make-xdg-optional.patch | 51 +++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 package/refpolicy/0006-policy-modules-apps-wireshark.te-make-xdg-optional.patch

diff --git a/package/refpolicy/0006-policy-modules-apps-wireshark.te-make-xdg-optional.patch b/package/refpolicy/0006-policy-modules-apps-wireshark.te-make-xdg-optional.patch
new file mode 100644
index 0000000000..5041a1a881
--- /dev/null
+++ b/package/refpolicy/0006-policy-modules-apps-wireshark.te-make-xdg-optional.patch
@@ -0,0 +1,51 @@
+From d5c571c85567fe191fcc64dfb99b36788f806ceb Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice at gmail.com>
+Date: Sun, 5 Sep 2021 11:06:21 +0200
+Subject: [PATCH] policy/modules/apps/wireshark.te: make xdg optional
+
+Make xdg optional to fix the following build failure:
+
+ Compiling targeted policy.31
+ env LD_LIBRARY_PATH="/tmp/instance-0/output-1/host/lib:/tmp/instance-0/output-1/host/usr/lib" /tmp/instance-0/output-1/host/usr/bin/checkpolicy -c 31 -U deny -S -O -E policy.conf -o policy.31
+ policy/modules/apps/wireshark.te:96:ERROR 'unknown type xdg_downloads_t' at token ';' on line 645315:
+ #line 96
+	allow wireshark_t xdg_downloads_t:dir { getattr search open };
+ checkpolicy:  error(s) encountered while parsing configuration
+ make[1]: *** [Rules.monolithic:79: policy.31] Error 1
+
+Fixes:
+ - http://autobuild.buildroot.org/results/dfbc667e0c17072ddab89a03244f572d5234da50
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
+[Upstream status: https://github.com/SELinuxProject/refpolicy/pull/405]
+---
+ policy/modules/apps/wireshark.te | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/policy/modules/apps/wireshark.te b/policy/modules/apps/wireshark.te
+index d765f9cd2..66e80fca9 100644
+--- a/policy/modules/apps/wireshark.te
++++ b/policy/modules/apps/wireshark.te
+@@ -93,8 +93,6 @@ userdom_use_user_terminals(wireshark_t)
+ 
+ userdom_user_content_access_template(wireshark, wireshark_t)
+ 
+-xdg_read_downloads(wireshark_t)
+-
+ tunable_policy(`use_nfs_home_dirs',`
+ 	fs_manage_nfs_dirs(wireshark_t)
+ 	fs_manage_nfs_files(wireshark_t)
+@@ -116,6 +114,10 @@ optional_policy(`
+ 	userhelper_sigchld(wireshark_t)
+ ')
+ 
++optional_policy(`
++	xdg_read_downloads(wireshark_t)
++')
++
+ optional_policy(`
+ 	xserver_user_x_domain_template(wireshark, wireshark_t, wireshark_tmpfs_t)
+ 	xserver_create_xdm_tmp_sockets(wireshark_t)
+-- 
+2.33.0
+
-- 
2.33.0



More information about the buildroot mailing list