0 Star 0 Fork 31

lixiao/selinux-policy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-Allow-rpmdb-read-admin-home-config-files.patch 1.98 KB
一键复制 编辑 原始数据 按行查看 历史
lujie54 提交于 2022-09-02 15:54 . backport upstream patches
From f402b06808835ad1a8aa393739efff1e40eaf8e8 Mon Sep 17 00:00:00 2001
From: Zdenek Pytela <zpytela@redhat.com>
Date: Tue, 16 Nov 2021 22:37:25 +0100
Subject: [PATCH] Allow rpmdb read admin home config files
Reference: https://gitbub.com/fedora-selinux/selinux-policy/commit/f402b06808835ad1a8aa393739efff1e40eaf8e8
Conflict: NA
Addresses the following AVC denial:
type=PROCTITLE msg=audit(11/16/2021 16:31:45.105:1455) : proctitle=/usr/bin/rpmdb --rebuilddb
type=PATH msg=audit(11/16/2021 16:31:45.105:1455) : item=0 name=/root/.rpmmacros inode=110039 dev=00:1f mode=file,644 ouid=root ogid=root rdev=00:00 obj=unconfined_u:object_r:admin_home_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0
type=CWD msg=audit(11/16/2021 16:31:45.105:1455) : cwd=/root
type=SYSCALL msg=audit(11/16/2021 16:31:45.105:1455) : arch=x86_64 syscall=openat success=yes exit=3 a0=0xffffff9c a1=0x560b2126e2a0 a2=O_RDONLY a3=0x0 items=1 ppid=40819 pid=59445 auid=root uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=pts0 ses=20 comm=rpmdb exe=/usr/bin/rpmdb subj=unconfined_u:unconfined_r:rpmdb_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(11/16/2021 16:31:45.105:1455) : avc: denied { open } for pid=59445 comm=rpmdb path=/root/.rpmmacros dev="sda2" ino=110039 scontext=unconfined_u:unconfined_r:rpmdb_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:admin_home_t:s0 tclass=file permissive=1
Resolves: rhbz#2023163
Signed-off-by: lujie54 <lujie54@huawei.com>
---
policy/modules/contrib/rpm.te | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/policy/modules/contrib/rpm.te b/policy/modules/contrib/rpm.te
index 9d2f4e6..f01d07c 100644
--- a/policy/modules/contrib/rpm.te
+++ b/policy/modules/contrib/rpm.te
@@ -279,6 +279,10 @@ files_rw_inherited_non_security_files(rpmdb_t)
sysnet_dontaudit_read_config(rpmdb_t)
+optional_policy(`
+ userdom_read_admin_home_files(rpmdb_t)
+')
+
########################################
#
# rpm-script Local policy
--
1.8.3.1
马建仓 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