swtpm/selinux.patch
Marc-André Lureau 663d46e294 Add extra SELinux policies
Resolves: RHEL-47273
2024-07-17 11:01:30 +04:00

35 lines
1.1 KiB
Diff

From 1eab90cc323509eda1b43ef81fccb4bcf28056f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
Date: Sat, 13 Jul 2024 13:37:29 +0400
Subject: [PATCH] selinux
---
src/selinux/swtpm_svirt.te | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/selinux/swtpm_svirt.te b/src/selinux/swtpm_svirt.te
index f7b886c..424efa7 100644
--- a/src/selinux/swtpm_svirt.te
+++ b/src/selinux/swtpm_svirt.te
@@ -13,6 +13,7 @@ require {
type user_tmp_t;
type virtd_t;
type virtqemud_t;
+ type virt_var_run_t;
}
swtpm_domtrans(svirt_t)
@@ -27,6 +28,9 @@ allow svirt_t user_tmp_t:sock_file { create setattr unlink };
allow svirt_t virtd_t:dir search;
allow svirt_t virtd_t:fifo_file write;
allow svirt_t virtqemud_t:fifo_file write;
+allow svirt_t virt_var_run_t:dir { write add_name remove_name };
+allow svirt_t virt_var_run_t:file { create write setattr unlink };
+allow svirt_t virt_var_run_t:sock_file { create write setattr unlink };
# For virt-install (see https://bugzilla.redhat.com/show_bug.cgi?id=2283878 )
allow svirt_tcg_t user_tmp_t:sock_file { create setattr unlink };
--
2.41.0.28.gd7d8841f67