1 Star 0 Fork 48

池鱼/systemd

forked from src-anolis-os/systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0418-selinux-do-preprocessor-check-only-in-selinux-access.patch 1.43 KB
一键复制 编辑 原始数据 按行查看 历史
geliwei 提交于 2021-06-16 16:46 . update to systemd-239-45.el8.src.rpm
From 7301b170b266225f091e95ff52b3a95ff9776d13 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michal=20Sekleta=CC=81r?= <msekleta@redhat.com>
Date: Fri, 3 Apr 2020 09:13:59 +0200
Subject: [PATCH] selinux: do preprocessor check only in selinux-access.c
This has the advantage that mac_selinux_access_check() can be used as a
function in all contexts. For example, parameters passed to it won't be
reported as unused if the "function" call is replaced with 0 on SELinux
disabled builds.
(cherry picked from commit 08deac6e3e9119aeb966375f94695e4aa14ffb1c)
Related: #1830861
---
src/core/selinux-access.h | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/src/core/selinux-access.h b/src/core/selinux-access.h
index 59f2e60c77..46a657a4b4 100644
--- a/src/core/selinux-access.h
+++ b/src/core/selinux-access.h
@@ -12,17 +12,8 @@
int mac_selinux_generic_access_check(sd_bus_message *message, const char *path, const char *permission, sd_bus_error *error);
-#if HAVE_SELINUX
-
#define mac_selinux_access_check(message, permission, error) \
mac_selinux_generic_access_check((message), NULL, (permission), (error))
#define mac_selinux_unit_access_check(unit, message, permission, error) \
mac_selinux_generic_access_check((message), unit_label_path(unit), (permission), (error))
-
-#else
-
-#define mac_selinux_access_check(message, permission, error) 0
-#define mac_selinux_unit_access_check(unit, message, permission, error) 0
-
-#endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zxy19951122/systemd.git
git@gitee.com:zxy19951122/systemd.git
zxy19951122
systemd
systemd
a8

搜索帮助