1 Star 0 Fork 48

池鱼/systemd

forked from src-anolis-os/systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0244-shared-but-util-drop-trusted-annotation-from-bus_ope.patch 1.22 KB
一键复制 编辑 原始数据 按行查看 历史
张彬琛 提交于 2021-01-20 13:59 . import systemd-239-29.el8.src.rpm
From c3be943b30689f77ded9f431fdafb666769aea89 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Tue, 27 Aug 2019 19:00:34 +0200
Subject: [PATCH] shared/but-util: drop trusted annotation from
bus_open_system_watch_bind_with_description()
https://bugzilla.redhat.com/show_bug.cgi?id=1746057
This only affects systemd-resolved. bus_open_system_watch_bind_with_description()
is also used in timesyncd, but it has no methods, only read-only properties, and
in networkd, but it annotates all methods with SD_BUS_VTABLE_UNPRIVILEGED and does
polkit checks.
Resolves: #1746857
---
src/shared/bus-util.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c
index a4f2deba31..302dbb4c2e 100644
--- a/src/shared/bus-util.c
+++ b/src/shared/bus-util.c
@@ -1699,10 +1699,6 @@ int bus_open_system_watch_bind_with_description(sd_bus **ret, const char *descri
if (r < 0)
return r;
- r = sd_bus_set_trusted(bus, true);
- if (r < 0)
- return r;
-
r = sd_bus_negotiate_creds(bus, true, SD_BUS_CREDS_UID|SD_BUS_CREDS_EUID|SD_BUS_CREDS_EFFECTIVE_CAPS);
if (r < 0)
return r;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zxy19951122/systemd.git
git@gitee.com:zxy19951122/systemd.git
zxy19951122
systemd
systemd
a8

搜索帮助