commit:     234f522a12f0214e10a7a56092e31a3ac747017a
Author:     Jason Zaman <jason <AT> perfinion <DOT> com>
AuthorDate: Sun Sep 10 13:47:28 2017 +0000
Commit:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Sun Sep 10 13:47:28 2017 +0000
URL:        
https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=234f522a

xdg: allow map perms

 policy/modules/contrib/xdg.if | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/policy/modules/contrib/xdg.if b/policy/modules/contrib/xdg.if
index 649266b3..3188d96f 100644
--- a/policy/modules/contrib/xdg.if
+++ b/policy/modules/contrib/xdg.if
@@ -79,6 +79,7 @@ interface(`xdg_read_cache_home_files',`
        ')
 
        read_files_pattern($1, xdg_cache_home_t, xdg_cache_home_t)
+       allow $1 xdg_cache_home_t:file map;
        list_dirs_pattern($1, xdg_cache_home_t, xdg_cache_home_t)
 
        userdom_search_user_home_dirs($1)
@@ -100,6 +101,7 @@ interface(`xdg_read_all_cache_home_files',`
        ')
 
        read_files_pattern($1, xdg_cache_home_type, xdg_cache_home_type)
+       allow $1 xdg_cache_home_type:file map;
 
        userdom_search_user_home_dirs($1)
 ')
@@ -208,6 +210,7 @@ interface(`xdg_manage_cache_home',`
 
        manage_dirs_pattern($1, xdg_cache_home_t, xdg_cache_home_t)
        manage_files_pattern($1, xdg_cache_home_t, xdg_cache_home_t)
+       allow $1 xdg_cache_home_t:file map;
        manage_lnk_files_pattern($1, xdg_cache_home_t, xdg_cache_home_t)
        manage_fifo_files_pattern($1, xdg_cache_home_t, xdg_cache_home_t)
        manage_sock_files_pattern($1, xdg_cache_home_t, xdg_cache_home_t)
@@ -232,6 +235,7 @@ interface(`xdg_manage_all_cache_home',`
 
        manage_dirs_pattern($1, xdg_cache_home_type, xdg_cache_home_type)
        manage_files_pattern($1, xdg_cache_home_type, xdg_cache_home_type)
+       allow $1 xdg_cache_home_type:file map;
        manage_lnk_files_pattern($1, xdg_cache_home_type, xdg_cache_home_type)
        manage_fifo_files_pattern($1, xdg_cache_home_type, xdg_cache_home_type)
        manage_sock_files_pattern($1, xdg_cache_home_type, xdg_cache_home_type)
@@ -323,6 +327,7 @@ interface(`xdg_read_config_home_files',`
        ')
 
        read_files_pattern($1, xdg_config_home_t, xdg_config_home_t)
+       allow $1 xdg_config_home_t:file map;
        list_dirs_pattern($1, xdg_config_home_t, xdg_config_home_t)
 
        userdom_search_user_home_dirs($1)
@@ -344,6 +349,7 @@ interface(`xdg_read_all_config_home_files',`
        ')
 
        read_files_pattern($1, xdg_config_home_type, xdg_config_home_type)
+       allow $1 xdg_config_home_type:file map;
 
        userdom_search_user_home_dirs($1)
 ')
@@ -453,6 +459,7 @@ interface(`xdg_manage_config_home',`
 
        manage_dirs_pattern($1, xdg_config_home_t, xdg_config_home_t)
        manage_files_pattern($1, xdg_config_home_t, xdg_config_home_t)
+       allow $1 xdg_config_home_t:file map;
        manage_lnk_files_pattern($1, xdg_config_home_t, xdg_config_home_t)
        manage_fifo_files_pattern($1, xdg_config_home_t, xdg_config_home_t)
        manage_sock_files_pattern($1, xdg_config_home_t, xdg_config_home_t)
@@ -477,6 +484,7 @@ interface(`xdg_manage_all_config_home',`
 
        manage_dirs_pattern($1, xdg_config_home_type, xdg_config_home_type)
        manage_files_pattern($1, xdg_config_home_type, xdg_config_home_type)
+       allow $1 xdg_config_home_type:file map;
        manage_lnk_files_pattern($1, xdg_config_home_type, xdg_config_home_type)
        manage_fifo_files_pattern($1, xdg_config_home_type, 
xdg_config_home_type)
        manage_sock_files_pattern($1, xdg_config_home_type, 
xdg_config_home_type)
@@ -548,6 +556,7 @@ interface(`xdg_read_data_home_files',`
        ')
 
        read_files_pattern($1, xdg_data_home_t, xdg_data_home_t)
+       allow $1 xdg_data_home_t:file map;
        list_dirs_pattern($1, xdg_data_home_t, xdg_data_home_t)
 
        userdom_search_user_home_dirs($1)
@@ -569,6 +578,7 @@ interface(`xdg_read_all_data_home_files',`
        ')
 
        read_files_pattern($1, xdg_data_home_type, xdg_data_home_type)
+       allow $1 xdg_data_home_type:file map;
 
        userdom_search_user_home_dirs($1)
 ')
@@ -677,6 +687,7 @@ interface(`xdg_manage_data_home',`
 
        manage_dirs_pattern($1, xdg_data_home_t, xdg_data_home_t)
        manage_files_pattern($1, xdg_data_home_t, xdg_data_home_t)
+       allow $1 xdg_data_home_t:file map;
        manage_lnk_files_pattern($1, xdg_data_home_t, xdg_data_home_t)
        manage_fifo_files_pattern($1, xdg_data_home_t, xdg_data_home_t)
        manage_sock_files_pattern($1, xdg_data_home_t, xdg_data_home_t)
@@ -701,6 +712,7 @@ interface(`xdg_manage_all_data_home',`
 
        manage_dirs_pattern($1, xdg_data_home_type, xdg_data_home_type)
        manage_files_pattern($1, xdg_data_home_type, xdg_data_home_type)
+       allow $1 xdg_data_home_type:file map;
        manage_lnk_files_pattern($1, xdg_data_home_type, xdg_data_home_type)
        manage_fifo_files_pattern($1, xdg_data_home_type, xdg_data_home_type)
        manage_sock_files_pattern($1, xdg_data_home_type, xdg_data_home_type)
@@ -772,6 +784,7 @@ interface(`xdg_read_downloads_home',`
        ')
 
        read_files_pattern($1, xdg_downloads_home_t, xdg_downloads_home_t)
+       allow $1 xdg_downloads_home_t:file map;
 
        userdom_search_user_home_dirs($1)
 ')
@@ -792,6 +805,7 @@ interface(`xdg_read_videos_home',`
        ')
 
        read_files_pattern($1, xdg_videos_home_t, xdg_videos_home_t)
+       allow $1 xdg_videos_home_t:file map;
        list_dirs_pattern($1, xdg_videos_home_t, xdg_videos_home_t)
 
        userdom_search_user_home_dirs($1)
@@ -813,6 +827,7 @@ interface(`xdg_read_pictures_home',`
        ')
 
        read_files_pattern($1, xdg_pictures_home_t, xdg_pictures_home_t)
+       allow $1 xdg_pictures_home_t:file map;
        list_dirs_pattern($1, xdg_pictures_home_t, xdg_pictures_home_t)
 
        userdom_search_user_home_dirs($1)
@@ -834,6 +849,7 @@ interface(`xdg_read_music_home',`
        ')
 
        read_files_pattern($1, xdg_music_home_t, xdg_music_home_t)
+       allow $1 xdg_music_home_t:file map;
        list_dirs_pattern($1, xdg_music_home_t, xdg_music_home_t)
 
        userdom_search_user_home_dirs($1)
@@ -855,6 +871,7 @@ interface(`xdg_create_downloads_home',`
        ')
 
        create_files_pattern($1, xdg_downloads_home_t, xdg_downloads_home_t)
+       allow $1 xdg_downloads_home_t:file map;
 
        userdom_search_user_home_dirs($1)
 ')
@@ -875,6 +892,7 @@ interface(`xdg_write_downloads_home',`
        ')
 
        write_files_pattern($1, xdg_downloads_home_t, xdg_downloads_home_t)
+       allow $1 xdg_downloads_home_t:file map;
 
        userdom_search_user_home_dirs($1)
 ')
@@ -896,6 +914,7 @@ interface(`xdg_manage_downloads_home',`
 
        manage_dirs_pattern($1, xdg_downloads_home_t, xdg_downloads_home_t)
        manage_files_pattern($1, xdg_downloads_home_t, xdg_downloads_home_t)
+       allow $1 xdg_downloads_home_t:file map;
 ')
 
 #########################################
@@ -915,6 +934,7 @@ interface(`xdg_manage_documents_home',`
 
        manage_dirs_pattern($1, xdg_documents_home_t, xdg_documents_home_t)
        manage_files_pattern($1, xdg_documents_home_t, xdg_documents_home_t)
+       allow $1 xdg_documents_home_t:file map;
 ')
 
 #########################################
@@ -934,6 +954,7 @@ interface(`xdg_manage_music_home',`
 
        manage_dirs_pattern($1, xdg_music_home_t, xdg_music_home_t)
        manage_files_pattern($1, xdg_music_home_t, xdg_music_home_t)
+       allow $1 xdg_music_home_t:file map;
 ')
 
 #########################################
@@ -953,6 +974,7 @@ interface(`xdg_manage_pictures_home',`
 
        manage_dirs_pattern($1, xdg_pictures_home_t, xdg_pictures_home_t)
        manage_files_pattern($1, xdg_pictures_home_t, xdg_pictures_home_t)
+       allow $1 xdg_pictures_home_t:file map;
 ')
 
 #########################################
@@ -972,4 +994,5 @@ interface(`xdg_manage_videos_home',`
 
        manage_dirs_pattern($1, xdg_videos_home_t, xdg_videos_home_t)
        manage_files_pattern($1, xdg_videos_home_t, xdg_videos_home_t)
+       allow $1 xdg_videos_home_t:file map;
 ')

Reply via email to