加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-Allow-chronyd-talk-with-unconfined-user-over-unix-do.patch 2.33 KB
一键复制 编辑 原始数据 按行查看 历史
lujie54 提交于 2022-09-15 09:20 . backport upstream patches
From bd3f86ee9fbae47287d63c496ba936348627122b Mon Sep 17 00:00:00 2001
From: Zdenek Pytela <zpytela@redhat.com>
Date: Thu, 31 Mar 2022 10:55:05 +0200
Subject: [PATCH] Allow chronyd talk with unconfined user over unix domain
dgram socket
Reference: https://gitbub.com/fedora-selinux/selinux-policy/commit/bd3f86ee9fbae47287d63c496ba936348627122b
Conflict: NA
This permission is required by applications which use the unix datagram
socket to communicate with chronyd directly, e.g. for monitoring
purposes. The other direction of communication is allowed by a rule for
unconfined_domain_type.
Addresses the following AVC denial:
type=PROCTITLE msg=audit(03/17/2022 12:11:19.881:312) : proctitle=/usr/sbin/chronyd
type=PATH msg=audit(03/17/2022 12:11:19.881:312) : item=0 name=/run/chrony/chronyc.sock inode=39486 dev=00:18 mode=socket,777 ouid=root ogid=root rdev=00:00 obj=unconfined_u:object_r:chronyd_var_run_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0
type=CWD msg=audit(03/17/2022 12:11:19.881:312) : cwd=/
type=SOCKADDR msg=audit(03/17/2022 12:11:19.881:312) : saddr={ saddr_fam=local path=/run/chrony/chronyc.sock }
type=SYSCALL msg=audit(03/17/2022 12:11:19.881:312) : arch=x86_64 syscall=sendmsg success=no exit=EACCES(Permission denied) a0=0x8 a1=0x7fffeef72f20 a2=0x0 a3=0x0 items=1 ppid=1 pid=680 auid=unset uid=chrony gid=chrony euid=chrony suid=chrony fsuid=chrony egid=chrony sgid=chrony fsgid=chrony tty=(none) ses=unset comm=chronyd exe=/usr/sbin/chronyd subj=system_u:system_r:chronyd_t:s0 key=(null)
type=AVC msg=audit(03/17/2022 12:11:19.881:312) : avc: denied { sendto } for pid=680 comm=chronyd path=/run/chrony/chronyc.sock scontext=system_u:system_r:chronyd_t:s0 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=unix_dgram_socket permissive=0
Resolves: rhbz#2065313
Signed-off-by: lujie54 <lujie54@huawei.com>
---
policy/modules/contrib/chronyd.te | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/policy/modules/contrib/chronyd.te b/policy/modules/contrib/chronyd.te
index 142139d..342735b 100644
--- a/policy/modules/contrib/chronyd.te
+++ b/policy/modules/contrib/chronyd.te
@@ -179,6 +179,10 @@ optional_policy(`
sosreport_dgram_send(chronyd_t)
')
+optional_policy(`
+ unconfined_dgram_send(chronyd_t)
+')
+
########################################
#
# Local policy
--
1.8.3.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化