commit:     c57bb49065554c2efa1f8bf8a6854eaeb0588d31
Author:     Kenton Groombridge <me <AT> concord <DOT> sh>
AuthorDate: Thu Jan  6 23:24:35 2022 +0000
Commit:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 01:12:42 2022 +0000
URL:        
https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=c57bb490

xdg: add interface to search xdg data directories

Signed-off-by: Kenton Groombridge <me <AT> concord.sh>
Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org>

 policy/modules/system/xdg.if | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/policy/modules/system/xdg.if b/policy/modules/system/xdg.if
index b7620384..6e1cd836 100644
--- a/policy/modules/system/xdg.if
+++ b/policy/modules/system/xdg.if
@@ -635,6 +635,24 @@ interface(`xdg_relabel_all_config',`
        userdom_search_user_home_dirs($1)
 ')
 
+########################################
+## <summary>
+##     Search through the xdg data home directories
+## </summary>
+## <param name="domain">
+##     <summary>
+##     Domain allowed access
+##     </summary>
+## </param>
+#
+interface(`xdg_search_data_dirs',`
+       gen_require(`
+               type xdg_data_t;
+       ')
+
+       allow $1 xdg_data_t:dir search_dir_perms;
+')
+
 ########################################
 ## <summary>
 ##     Watch the xdg data home directories

Reply via email to