selinux-policy/backport-Add-systemd_resolved_write_pid_sock_files-interface.patch

45 lines
1.2 KiB
Diff
Raw Normal View History

2021-05-31 16:38:15 +08:00
From 33837787642166330b1400133de2023aa931f236 Mon Sep 17 00:00:00 2001
From: Zdenek Pytela <zpytela@redhat.com>
Date: Thu, 10 Dec 2020 00:15:37 +0100
Reference: https://github.com/fedora-selinux/selinux-policy/commit/33837787642166330b1400133de2023aa931f236
Conflict: NA
Subject: [PATCH] Add systemd_resolved_write_pid_sock_files() interface
---
policy/modules/system/systemd.if | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/policy/modules/system/systemd.if b/policy/modules/system/systemd.if
index ffed76c..26d4927 100644
--- a/policy/modules/system/systemd.if
+++ b/policy/modules/system/systemd.if
@@ -318,6 +318,25 @@ interface(`systemd_resolved_read_pid',`
######################################
## <summary>
+## Write to systemd_resolved PID socket files.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`systemd_resolved_write_pid_sock_files',`
+ gen_require(`
+ type systemd_resolved_var_run_t;
+ ')
+
+ files_search_pids($1)
+ write_sock_files_pattern($1, systemd_resolved_var_run_t, systemd_resolved_var_run_t)
+')
+
+######################################
+## <summary>
## Read systemd_login PID files.
## </summary>
## <param name="domain">
--
1.8.3.1