0 Star 0 Fork 31

lixiao/selinux-policy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-Allow-staff_u-and-user_u-users-write-to-bolt-pipe.patch 1.94 KB
一键复制 编辑 原始数据 按行查看 历史
lujie42 提交于 2022-11-27 22:53 . update upstream patches
From 5adbc14b634b60c5bd779fb22c5bf4a674a83020 Mon Sep 17 00:00:00 2001
From: Zdenek Pytela <zpytela@redhat.com>
Date: Fri, 9 Sep 2022 17:21:10 +0200
Subject: [PATCH] Allow staff_u and user_u users write to bolt pipe
Addresses the following AVC denial:
-
type=PROCTITLE msg=audit(6.9.2022 07:26:55.355:15479) : proctitle=boltctl power
type=SYSCALL msg=audit(6.9.2022 07:26:55.355:15479) : arch=x86_64 syscall=recvmsg success=yes exit=16 a0=0x5 a1=0x7f341adfd940 a2=MSG_CMSG_CLOEXEC a3=0x7fff30353080 items=0 ppid=1832290 pid=1905598 auid=username uid=username gid=username euid=username suid=username fsuid=username egid=username sgid=username fsgid=username tty=pts18 ses=3 comm=gdbus exe=/usr/bin/boltctl subj=staff_u:staff_r:staff_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(6.9.2022 07:26:55.355:15479) : avc: denied { write } for pid=1905598 comm=gdbus path=/run/boltd/power/1.guard.fifo dev="tmpfs" ino=95970 scontext=staff_u:staff_r:staff_t:s0-s0:c0.c1023 tcontext=system_u:object_r:boltd_var_run_t:s0 tclass=fifo_file permissive=1
Signed-off-by: lujie42 <lujie54@huawei.com>
---
policy/modules/roles/staff.te | 4 ++++
policy/modules/roles/unprivuser.te | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/policy/modules/roles/staff.te b/policy/modules/roles/staff.te
index a573eba03..907710baf 100644
--- a/policy/modules/roles/staff.te
+++ b/policy/modules/roles/staff.te
@@ -103,6 +103,10 @@ optional_policy(`
blueman_dbus_chat(staff_t)
')
+optional_policy(`
+ boltd_write_var_run_pipes(staff_t)
+')
+
optional_policy(`
kdumpgui_dbus_chat(staff_t)
')
diff --git a/policy/modules/roles/unprivuser.te b/policy/modules/roles/unprivuser.te
index 56a8be217..a4781914e 100644
--- a/policy/modules/roles/unprivuser.te
+++ b/policy/modules/roles/unprivuser.te
@@ -66,6 +66,10 @@ optional_policy(`
bluetooth_role(user_r, user_t)
')
+optional_policy(`
+ boltd_write_var_run_pipes(user_t)
+')
+
optional_policy(`
colord_dbus_chat(user_t)
')
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lixiao2023/selinux-policy.git
git@gitee.com:lixiao2023/selinux-policy.git
lixiao2023
selinux-policy
selinux-policy
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385