selinux-policy/backport-Add-lvm_dbus_send_msg-lvm_rw_var_run-interfaces.patch
2021-05-31 18:58:06 +08:00

61 lines
1.4 KiB
Diff

From 86c35f41cfe150545db77835cb96bf342f35f44f Mon Sep 17 00:00:00 2001
From: Tony Asleson <tasleson@redhat.com>
Date: Fri, 11 Sep 2020 11:06:28 -0500
Reference: https://github.com/fedora-selinux/selinux-policy/commit/86c35f41cfe150545db77835cb96bf342f35f44f
Conflict: NA
Subject: [PATCH] Add lvm_dbus_send_msg(), lvm_rw_var_run() interfaces
Signed-off-by: Tony Asleson <tasleson@redhat.com>
---
policy/modules/system/lvm.if | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/policy/modules/system/lvm.if b/policy/modules/system/lvm.if
index fbbb39e..7f3903a 100644
--- a/policy/modules/system/lvm.if
+++ b/policy/modules/system/lvm.if
@@ -452,4 +452,40 @@ interface(`lvm_manage_lock',`
')
+########################################
+## <summary>
+## Allow dbus send for lvm dbus API (only send needed)
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`lvm_dbus_send_msg',`
+ gen_require(`
+ type lvm_t;
+ class dbus send_msg;
+ ')
+ allow $1 lvm_t:dbus send_msg;
+')
+
+########################################
+## <summary>
+## Allow lvm hints file access
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`lvm_rw_var_run',`
+ gen_require(`
+ type lvm_t;
+ type lvm_var_run_t;
+ ')
+ allow $1 lvm_var_run_t:file { rw_file_perms };
+
+')
--
1.8.3.1