0 Star 0 Fork 33

lixiao/selinux-policy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-Allow-userdomains-use-pam_ssh_agent_auth-for-passwor.patch 1.40 KB
一键复制 编辑 原始数据 按行查看 历史
lujie54 提交于 2022-09-02 15:54 . backport upstream patches
From 901ac5314982f5600ef11691969b9af89aeba772 Mon Sep 17 00:00:00 2001
From: Zdenek Pytela <zpytela@redhat.com>
Date: Mon, 20 Dec 2021 14:21:33 +0100
Subject: [PATCH] Allow userdomains use pam_ssh_agent_auth for passwordless
sudo
Reference: https://gitbub.com/fedora-selinux/selinux-policy/commit/901ac5314982f5600ef11691969b9af89aeba772
Conflict: NA
The pam_ssh_agent_auth module can be used for granting permissions based
on SSH agent requests. When configured for using in the sudo pam module,
it requires permissions for sudodomain to use the user socket file and
stream connect to its corresponding userdomain.
Resolves: rhbz#1917879
Signed-off-by: lujie54 <lujie54@huawei.com>
---
policy/modules/admin/sudo.if | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/policy/modules/admin/sudo.if b/policy/modules/admin/sudo.if
index 356b150..f6df896 100644
--- a/policy/modules/admin/sudo.if
+++ b/policy/modules/admin/sudo.if
@@ -58,6 +58,8 @@ template(`sudo_role_template',`
allow $1_sudo_t $3:file read_file_perms;;
allow $1_sudo_t $3:key search;
+ allow $1_sudo_t $1_t:unix_stream_socket connectto;
+
# Enter this derived domain from the user domain
domtrans_pattern($3, sudo_exec_t, $1_sudo_t)
@@ -99,6 +101,10 @@ template(`sudo_role_template',`
')
optional_policy(`
+ userdom_write_user_tmp_sockets($1_sudo_t)
+ ')
+
+ optional_policy(`
usermanage_domtrans_passwd($1_sudo_t)
')
')
--
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

搜索帮助