++##
++## Allow logrotate to read logs inside
++##
++##
++gen_tunable(logrotate_read_inside_containers, false)
++
type logrotate_t;
-type logrotate_exec_t;
@@ -45877,7 +45884,7 @@ index be0ab84..5160f96 100644
type logrotate_lock_t;
files_lock_file(logrotate_lock_t)
-@@ -25,21 +31,30 @@ files_tmp_file(logrotate_tmp_t)
+@@ -25,21 +38,30 @@ files_tmp_file(logrotate_tmp_t)
type logrotate_var_lib_t;
files_type(logrotate_var_lib_t)
@@ -45914,7 +45921,7 @@ index be0ab84..5160f96 100644
allow logrotate_t self:shm create_shm_perms;
allow logrotate_t self:sem create_sem_perms;
allow logrotate_t self:msgq create_msgq_perms;
-@@ -48,36 +63,52 @@ allow logrotate_t self:msg { send receive };
+@@ -48,36 +70,52 @@ allow logrotate_t self:msg { send receive };
allow logrotate_t logrotate_lock_t:file manage_file_perms;
files_lock_filetrans(logrotate_t, logrotate_lock_t, file)
@@ -45972,7 +45979,7 @@ index be0ab84..5160f96 100644
files_manage_generic_spool(logrotate_t)
files_manage_generic_spool_dirs(logrotate_t)
files_getattr_generic_locks(logrotate_t)
-@@ -95,32 +126,55 @@ mls_process_write_to_clearance(logrotate_t)
+@@ -95,32 +133,55 @@ mls_process_write_to_clearance(logrotate_t)
selinux_get_fs_mount(logrotate_t)
selinux_get_enforce_mode(logrotate_t)
@@ -45990,8 +45997,7 @@ index be0ab84..5160f96 100644
+# cjp: why is this needed?
logging_exec_all_logs(logrotate_t)
+logging_systemctl_syslogd(logrotate_t)
-
--miscfiles_read_localization(logrotate_t)
++
+systemd_exec_systemctl(logrotate_t)
+systemd_getattr_unit_files(logrotate_t)
+systemd_start_all_unit_files(logrotate_t)
@@ -46000,12 +46006,13 @@ index be0ab84..5160f96 100644
+systemd_dbus_chat_logind(logrotate_t)
+init_stream_connect(logrotate_t)
--seutil_dontaudit_read_config(logrotate_t)
+-miscfiles_read_localization(logrotate_t)
+miscfiles_read_hwdata(logrotate_t)
--userdom_use_user_terminals(logrotate_t)
+-seutil_dontaudit_read_config(logrotate_t)
+term_dontaudit_use_unallocated_ttys(logrotate_t)
-+
+
+-userdom_use_user_terminals(logrotate_t)
+userdom_use_inherited_user_terminals(logrotate_t)
userdom_list_user_home_dirs(logrotate_t)
userdom_use_unpriv_users_fds(logrotate_t)
@@ -46034,7 +46041,7 @@ index be0ab84..5160f96 100644
')
optional_policy(`
-@@ -135,16 +189,17 @@ optional_policy(`
+@@ -135,16 +196,17 @@ optional_policy(`
optional_policy(`
apache_read_config(logrotate_t)
@@ -46054,7 +46061,7 @@ index be0ab84..5160f96 100644
')
optional_policy(`
-@@ -170,6 +225,11 @@ optional_policy(`
+@@ -170,6 +232,11 @@ optional_policy(`
')
optional_policy(`
@@ -46066,7 +46073,7 @@ index be0ab84..5160f96 100644
fail2ban_stream_connect(logrotate_t)
')
-@@ -178,7 +238,7 @@ optional_policy(`
+@@ -178,7 +245,7 @@ optional_policy(`
')
optional_policy(`
@@ -46075,7 +46082,7 @@ index be0ab84..5160f96 100644
')
optional_policy(`
-@@ -198,17 +258,18 @@ optional_policy(`
+@@ -198,17 +265,18 @@ optional_policy(`
')
optional_policy(`
@@ -46097,7 +46104,7 @@ index be0ab84..5160f96 100644
')
optional_policy(`
-@@ -216,6 +277,14 @@ optional_policy(`
+@@ -216,6 +284,14 @@ optional_policy(`
')
optional_policy(`
@@ -46112,7 +46119,7 @@ index be0ab84..5160f96 100644
samba_exec_log(logrotate_t)
')
-@@ -228,26 +297,43 @@ optional_policy(`
+@@ -228,26 +304,50 @@ optional_policy(`
')
optional_policy(`
@@ -46146,6 +46153,13 @@ index be0ab84..5160f96 100644
+ virt_manage_cache(logrotate_t)
+')
+
++
++optional_policy(`
++ tunable_policy(`logrotate_read_inside_containers',`
++ virt_read_sandbox_files(logrotate_t)
++ ')
++')
++
#######################################
#
-# Mail local policy
@@ -49799,10 +49813,10 @@ index 0000000..f5b98e6
+')
diff --git a/mock.te b/mock.te
new file mode 100644
-index 0000000..66c45cb
+index 0000000..2d4fb00
--- /dev/null
+++ b/mock.te
-@@ -0,0 +1,284 @@
+@@ -0,0 +1,285 @@
+policy_module(mock,1.0.0)
+
+##