加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-Allow-nsswitch_domain-to-connect-to-systemd-machined.patch 1.76 KB
一键复制 编辑 原始数据 按行查看 历史
luhuaxin 提交于 2021-05-31 16:38 . backport some upstream patches
From 6fe205674f9cd1face5e2cf1aeb90d265ef89ba8 Mon Sep 17 00:00:00 2001
From: Zdenek Pytela <zpytela@redhat.com>
Date: Wed, 12 Aug 2020 12:09:21 +0200
Reference: https://github.com/fedora-selinux/selinux-policy/commit/6fe205674f9cd1face5e2cf1aeb90d265ef89ba8
Conflict: NA
Subject: [PATCH] Allow nsswitch_domain to connect to systemd-machined using a
unix socket
Create the systemd_machined_stream_connect() interface.
Resolves: rhbz#1865748
---
policy/modules/system/authlogin.te | 1 +
policy/modules/system/systemd.if | 19 +++++++++++++++++++
2 files changed, 20 insertions(+)
diff --git a/policy/modules/system/authlogin.te b/policy/modules/system/authlogin.te
index 25d1691..6043c45 100644
--- a/policy/modules/system/authlogin.te
+++ b/policy/modules/system/authlogin.te
@@ -563,6 +563,7 @@ optional_policy(`
optional_policy(`
systemd_userdbd_stream_connect(nsswitch_domain)
+ systemd_machined_stream_connect(nsswitch_domain)
')
optional_policy(`
diff --git a/policy/modules/system/systemd.if b/policy/modules/system/systemd.if
index a6d8bd0..dbc8fc9 100644
--- a/policy/modules/system/systemd.if
+++ b/policy/modules/system/systemd.if
@@ -2001,6 +2001,25 @@ interface(`systemd_machined_rw_devpts_chr_files',`
########################################
## <summary>
+## Allow the specified domain to connect to
+## systemd_machined with a unix socket.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`systemd_machined_stream_connect',`
+ gen_require(`
+ type systemd_machined_t;
+ ')
+
+ allow $1 systemd_machined_t:unix_stream_socket connectto;
+')
+
+########################################
+## <summary>
## Send and receive messages from
## systemd machined over dbus.
## </summary>
--
1.8.3.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化