From 81ab7c124eea5b9227589286c69e08f3bbd3fe5e Mon Sep 17 00:00:00 2001
From: Zdenek Pytela <zpytela@redhat.com>
Date: Fri, 5 Aug 2022 21:13:32 +0200
Subject: [PATCH] Allow launch-xenstored read filesystem sysctls

Reference: https://gitbub.com/fedora-selinux/selinux-policy/commit/81ab7c124eea5b9227589286c69e08f3bbd3fe5e
Conflict: NA

Addresses the following AVC denial:
Aug 02 13:10:18 doppelganger.flyn.org audit[949]: AVC avc:  denied  { search } for  pid=949 comm="launch-xenstore" name="fs" dev="proc" ino=15591 scontext=system_u:system_r:xenstored_t:s0 tcontext=system_u:object_r:sysctl_fs_t:s0 tclass=dir permissive=1

Resolves: rhbz#2114498
Signed-off-by: lujie54 <lujie54@huawei.com>
---
 policy/modules/contrib/xen.te | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/policy/modules/contrib/xen.te b/policy/modules/contrib/xen.te
index c4bee9b..bbda603 100644
--- a/policy/modules/contrib/xen.te
+++ b/policy/modules/contrib/xen.te
@@ -450,6 +450,8 @@ files_var_lib_filetrans(xenstored_t, xenstored_var_lib_t, { file dir sock_file }
 
 stream_connect_pattern(xenstored_t, evtchnd_var_run_t, evtchnd_var_run_t, evtchnd_t)
 
+kernel_read_fs_sysctls(xenstored_t)
+
 auth_use_nsswitch(xenstored_t)
 
 can_exec(xenstored_t, xenstored_exec_t)
-- 
1.8.3.1

