@@ -21,6 +21,12 @@ files_type(test_overlay_files_ro_t)
2121type test_overlay_files_rwx_t;
2222files_type(test_overlay_files_rwx_t)
2323
24+ type test_overlay_files_map_ro_t;
25+ files_type(test_overlay_files_map_ro_t)
26+
27+ type test_overlay_files_map_rwx_t;
28+ files_type(test_overlay_files_map_rwx_t)
29+
2430type test_overlay_mounter_files_t;
2531files_type(test_overlay_mounter_files_t)
2632
@@ -60,7 +66,11 @@ allow test_overlay_mounter_t test_overlay_files_ro_t:file mounton;
6066allow test_overlay_mounter_t test_overlay_files_ro_t:filesystem { mount relabelfrom relabelto };
6167allow test_overlay_mounter_t test_overlay_files_rwx_t:{dir file} mounton;
6268allow test_overlay_mounter_t test_overlay_files_rwx_t:filesystem { mount relabelfrom relabelto };
63- can_exec(test_overlay_mounter_t, test_overlay_files_ro_t)
69+ allow test_overlay_mounter_t test_overlay_files_map_ro_t:file mounton;
70+ allow test_overlay_mounter_t test_overlay_files_map_ro_t:filesystem { mount relabelfrom relabelto };
71+ allow test_overlay_mounter_t test_overlay_files_map_rwx_t:{dir file} mounton;
72+ allow test_overlay_mounter_t test_overlay_files_map_rwx_t:filesystem { mount relabelfrom relabelto };
73+ can_exec(test_overlay_mounter_t, test_overlay_files_map_ro_t)
6474
6575#
6676# Mounter should be allowed to search/read r/o directories and files
@@ -70,10 +80,14 @@ read_files_pattern(test_overlay_mounter_t, test_overlay_files_ro_t, test_overlay
7080read_chr_files_pattern(test_overlay_mounter_t, test_overlay_files_ro_t, test_overlay_files_ro_t)
7181read_blk_files_pattern(test_overlay_mounter_t, test_overlay_files_ro_t, test_overlay_files_ro_t)
7282read_lnk_files_pattern(test_overlay_mounter_t, test_overlay_files_ro_t, test_overlay_files_ro_t)
83+ list_dirs_pattern(test_overlay_mounter_t, test_overlay_files_map_ro_t, test_overlay_files_map_ro_t)
84+ read_files_pattern(test_overlay_mounter_t, test_overlay_files_map_ro_t, test_overlay_files_map_ro_t)
85+ allow_map(test_overlay_mounter_t, test_overlay_files_map_ro_t, file)
7386allow test_overlay_mounter_t test_overlay_files_ro_t:dir mounton;
7487allow test_overlay_mounter_t test_overlay_mounter_files_t:dir mounton;
75- allow test_overlay_mounter_t test_overlay_files_rwx_t :filesystem unmount;
88+ allow test_overlay_mounter_t test_overlay_files_map_rwx_t :filesystem unmount;
7689manage_files_pattern(test_overlay_mounter_t, test_overlay_mounter_files_t, test_overlay_mounter_files_t)
90+ allow_map(test_overlay_mounter_t, test_overlay_mounter_files_t, file)
7791# Needed for transition
7892manage_dirs_pattern(test_overlay_mounter_t, test_overlay_mounter_files_t, test_overlay_mounter_files_t)
7993#
@@ -90,6 +104,10 @@ manage_dirs_pattern(test_overlay_mounter_t, test_overlay_files_rwx_t, test_overl
90104manage_lnk_files_pattern(test_overlay_mounter_t, test_overlay_files_rwx_t, test_overlay_files_rwx_t)
91105manage_sock_files_pattern(test_overlay_mounter_t, test_overlay_files_rwx_t, test_overlay_files_rwx_t)
92106
107+ manage_files_pattern(test_overlay_mounter_t, test_overlay_files_map_rwx_t, test_overlay_files_map_rwx_t)
108+ manage_dirs_pattern(test_overlay_mounter_t, test_overlay_files_map_rwx_t, test_overlay_files_map_rwx_t)
109+ allow_map(test_overlay_mounter_t, test_overlay_files_map_rwx_t, file)
110+
93111manage_files_pattern(test_overlay_mounter_t, test_overlay_transition_files_t, test_overlay_transition_files_t)
94112
95113#
@@ -121,7 +139,11 @@ list_dirs_pattern(test_overlay_client_t, test_overlay_files_ro_t, test_overlay_f
121139read_lnk_files_pattern(test_overlay_client_t, test_overlay_files_ro_t, test_overlay_files_ro_t)
122140read_chr_files_pattern(test_overlay_client_t, test_overlay_files_ro_t, test_overlay_files_ro_t)
123141read_sock_files_pattern(test_overlay_client_t, test_overlay_files_ro_t, test_overlay_files_ro_t)
124- can_exec(test_overlay_client_t, test_overlay_files_ro_t)
142+
143+ read_files_pattern(test_overlay_client_t, test_overlay_files_map_ro_t, test_overlay_files_map_ro_t)
144+ allow_map(test_overlay_client_t, test_overlay_files_map_ro_t, file)
145+ can_exec(test_overlay_client_t, test_overlay_files_map_ro_t)
146+ allow test_overlay_client_t test_overlay_files_map_ro_t:file entrypoint;
125147
126148#
127149# Client should be allowed to execute/write/search/read r/w/x directories and files
@@ -131,15 +153,22 @@ manage_dirs_pattern(test_overlay_client_t, test_overlay_files_rwx_t, test_overla
131153manage_lnk_files_pattern(test_overlay_client_t, test_overlay_files_rwx_t, test_overlay_files_rwx_t)
132154rw_chr_files_pattern(test_overlay_client_t, test_overlay_files_rwx_t, test_overlay_files_rwx_t)
133155manage_sock_files_pattern(test_overlay_client_t, test_overlay_files_rwx_t, test_overlay_files_rwx_t)
134- can_exec(test_overlay_client_t, test_overlay_files_rwx_t)
135- allow test_overlay_client_t test_overlay_files_rwx_t:file entrypoint;
156+
157+ manage_files_pattern(test_overlay_client_t, test_overlay_files_map_rwx_t, test_overlay_files_map_rwx_t)
158+ manage_dirs_pattern(test_overlay_client_t, test_overlay_files_map_rwx_t, test_overlay_files_map_rwx_t)
159+ manage_lnk_files_pattern(test_overlay_client_t, test_overlay_files_map_rwx_t, test_overlay_files_map_rwx_t)
160+ rw_chr_files_pattern(test_overlay_client_t, test_overlay_files_map_rwx_t, test_overlay_files_map_rwx_t)
161+ manage_sock_files_pattern(test_overlay_client_t, test_overlay_files_map_rwx_t, test_overlay_files_map_rwx_t)
162+ allow_map(test_overlay_client_t, test_overlay_files_map_rwx_t, file)
163+ can_exec(test_overlay_client_t, test_overlay_files_map_rwx_t)
164+ allow test_overlay_client_t test_overlay_files_map_rwx_t:file entrypoint;
136165
137166#
138167# Client needs to manage test_overlay_transition_files_t and transition on file named "transition"
139168#
140169manage_files_pattern(test_overlay_client_t, test_overlay_transition_files_t, test_overlay_transition_files_t)
141170manage_dirs_pattern(test_overlay_client_t, test_overlay_transition_files_t, test_overlay_transition_files_t)
142- filetrans_pattern(test_overlay_client_t, test_overlay_files_rwx_t , test_overlay_transition_files_t, file, "transition")
171+ filetrans_pattern(test_overlay_client_t, test_overlay_files_map_rwx_t , test_overlay_transition_files_t, file, "transition")
143172
144173#
145174# Client needs to search test_file_t directory and execute tests
@@ -153,7 +182,9 @@ can_exec(test_overlay_client_t,test_file_t)
153182#
154183allow test_overlay_client_t test_overlay_files_rwx_t:file { relabelto relabelfrom };
155184allow test_overlay_mounter_t test_overlay_files_rwx_t:file { relabelto relabelfrom };
156- can_exec(test_overlay_mounter_t, test_overlay_files_rwx_t)
185+ allow test_overlay_client_t test_overlay_files_map_rwx_t:file { relabelto relabelfrom };
186+ allow test_overlay_mounter_t test_overlay_files_map_rwx_t:file { relabelto relabelfrom };
187+ can_exec(test_overlay_mounter_t, test_overlay_files_map_rwx_t)
157188
158189#
159190# Server needs to manage socket files
0 commit comments