代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/selinux-policy 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 8879c209b0916931aab95d733fc7f4b52b99258b Mon Sep 17 00:00:00 2001
From: Zdenek Pytela <zpytela@redhat.com>
Date: Wed, 22 Dec 2021 13:06:33 +0100
Subject: [PATCH] Allow sysadm execute sysadmctl in sysadm_t domain using sudo
Reference: https://gitbub.com/fedora-selinux/selinux-policy/commit/8879c209b0916931aab95d733fc7f4b52b99258b
Conflict: NA
When an unprivileged user in the sysadm_r role executes systemctl
through sudo, it transitions into sysadm_sudo_t domain by default.
With this commit, the process transitions back to sysadm_t.
The systemd_domtrans_systemctl() interface was added.
Resolves: rhbz#2013749
Signed-off-by: lujie54 <lujie54@huawei.com>
---
policy/modules/admin/sudo.if | 5 +++++
policy/modules/system/systemd.if | 23 +++++++++++++++++++++++
2 files changed, 28 insertions(+)
diff --git a/policy/modules/admin/sudo.if b/policy/modules/admin/sudo.if
index f6df896..24ede58 100644
--- a/policy/modules/admin/sudo.if
+++ b/policy/modules/admin/sudo.if
@@ -101,6 +101,11 @@ template(`sudo_role_template',`
')
optional_policy(`
+ systemd_domtrans_systemctl($1_sudo_t, $3)
+ systemd_systemctl_entrypoint($3)
+ ')
+
+ optional_policy(`
userdom_write_user_tmp_sockets($1_sudo_t)
')
diff --git a/policy/modules/system/systemd.if b/policy/modules/system/systemd.if
index ec58e33..351438c 100644
--- a/policy/modules/system/systemd.if
+++ b/policy/modules/system/systemd.if
@@ -128,6 +128,29 @@ interface(`systemd_systemctl_entrypoint',`
#######################################
## <summary>
+## Execute systemctl in the specified domain
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+## <param name="target_domain">
+## <summary>
+## Domain to transition to.
+## </summary>
+## </param>
+#
+interface(`systemd_domtrans_systemctl',`
+ gen_require(`
+ type systemd_systemctl_exec_t;
+ ')
+
+ domain_auto_transition_pattern($1, systemd_systemctl_exec_t, $2)
+')
+
+#######################################
+## <summary>
## Create a file type used for systemd unit files.
## </summary>
## <param name="script_file">
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。