++##
++## Allow all domains write to kmsg_device,
++## while kernel is executed with systemd.log_target=kmsg parameter.
++##
++##
++gen_tunable(domain_can_write_kmsg, false)
++
# Mark process types as domains
attribute domain;
+attribute named_filetrans_domain;
# Transitions only allowed from domains to other domains
neverallow domain ~domain:process { transition dyntransition };
-@@ -86,23 +110,55 @@ neverallow ~{ domain unlabeled_t } *:process *;
+@@ -86,23 +118,59 @@ neverallow ~{ domain unlabeled_t } *:process *;
allow domain self:dir list_dir_perms;
allow domain self:lnk_file { read_lnk_file_perms lock ioctl };
allow domain self:file rw_file_perms;
@@ -10539,13 +10558,17 @@ index cf04cb5..ae8a257 100644
+ userdom_search_admin_dir(domain)
+')
+
++tunable_policy(`domain_can_write_kmsg',`
++ dev_write_kmsg(domain)
++')
++
+tunable_policy(`domain_kernel_load_modules',`
+ kernel_request_load_module(domain)
+')
ifdef(`hide_broken_symptoms',`
# This check is in the general socket
-@@ -121,8 +177,19 @@ tunable_policy(`global_ssp',`
+@@ -121,8 +189,19 @@ tunable_policy(`global_ssp',`
')
optional_policy(`
@@ -10565,7 +10588,7 @@ index cf04cb5..ae8a257 100644
')
optional_policy(`
-@@ -133,6 +200,9 @@ optional_policy(`
+@@ -133,6 +212,9 @@ optional_policy(`
optional_policy(`
xserver_dontaudit_use_xdm_fds(domain)
xserver_dontaudit_rw_xdm_pipes(domain)
@@ -10575,7 +10598,7 @@ index cf04cb5..ae8a257 100644
')
########################################
-@@ -145,14 +215,21 @@ optional_policy(`
+@@ -145,14 +227,21 @@ optional_policy(`
# be used on an attribute.
# Use/sendto/connectto sockets created by any domain.
@@ -10598,7 +10621,7 @@ index cf04cb5..ae8a257 100644
# Create/access any System V IPC objects.
allow unconfined_domain_type domain:{ sem msgq shm } *;
-@@ -160,11 +237,386 @@ allow unconfined_domain_type domain:msg { send receive };
+@@ -160,11 +249,386 @@ allow unconfined_domain_type domain:msg { send receive };
# For /proc/pid
allow unconfined_domain_type domain:dir list_dir_perms;
@@ -10987,7 +11010,7 @@ index cf04cb5..ae8a257 100644
+ unconfined_server_stream_connect(domain)
+')
diff --git a/policy/modules/kernel/files.fc b/policy/modules/kernel/files.fc
-index b876c48..03f9342 100644
+index b876c48..3690ce4 100644
--- a/policy/modules/kernel/files.fc
+++ b/policy/modules/kernel/files.fc
@@ -18,6 +18,7 @@ ifdef(`distro_redhat',`
@@ -11127,7 +11150,7 @@ index b876c48..03f9342 100644
+ifdef(`distro_redhat',`
+/rhev -d gen_context(system_u:object_r:mnt_t,s0)
+/rhev(/[^/]*)? -d gen_context(system_u:object_r:mnt_t,s0)
-+/rhev/[^/]*/.* <