ae80ad
From 4eedaaad7c0abb937482bc93c29c213acfe6c308 Mon Sep 17 00:00:00 2001
4bff0a
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
4bff0a
Date: Tue, 27 Aug 2019 19:00:34 +0200
4bff0a
Subject: [PATCH] shared/but-util: drop trusted annotation from
4bff0a
 bus_open_system_watch_bind_with_description()
4bff0a
4bff0a
https://bugzilla.redhat.com/show_bug.cgi?id=1746057
4bff0a
4bff0a
This only affects systemd-resolved. bus_open_system_watch_bind_with_description()
4bff0a
is also used in timesyncd, but it has no methods, only read-only properties, and
4bff0a
in networkd, but it annotates all methods with SD_BUS_VTABLE_UNPRIVILEGED and does
4bff0a
polkit checks.
4bff0a
4bff0a
Resolves: #1746857
4bff0a
---
4bff0a
 src/shared/bus-util.c | 4 ----
4bff0a
 1 file changed, 4 deletions(-)
4bff0a
4bff0a
diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c
4bff0a
index a4f2deba31..302dbb4c2e 100644
4bff0a
--- a/src/shared/bus-util.c
4bff0a
+++ b/src/shared/bus-util.c
4bff0a
@@ -1699,10 +1699,6 @@ int bus_open_system_watch_bind_with_description(sd_bus **ret, const char *descri
4bff0a
         if (r < 0)
4bff0a
                 return r;
4bff0a
 
4bff0a
-        r = sd_bus_set_trusted(bus, true);
4bff0a
-        if (r < 0)
4bff0a
-                return r;
4bff0a
-
4bff0a
         r = sd_bus_negotiate_creds(bus, true, SD_BUS_CREDS_UID|SD_BUS_CREDS_EUID|SD_BUS_CREDS_EFFECTIVE_CAPS);
4bff0a
         if (r < 0)
4bff0a
                 return r;