blob: f8f5b08a9610acd425560e4ebe09b397329ba714 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001From 44562e33655668033a8ee0a7a686671226da2110 Mon Sep 17 00:00:00 2001
2From: Brad Bishop <bradleyb@fuzziesquirrel.com>
3Date: Tue, 13 Mar 2018 15:34:30 -0400
4Subject: [PATCH] sd-bus: Don't automatically add ObjectManager
5
6Even though sdbus helps manage org.freedesktop.DBus.ObjectManager
Gunnar Millse5b38602018-08-31 12:39:15 -05007it must still be explicitly enabled by a library client.
Brad Bishopd7bf8c12018-02-25 22:55:05 -05008
9As such do not automatically add ObjectManager to GetManagedObjects
10method call responses or InterfacesAdded/Removed signals. Bus
11service client applications can potentially react to the appearance
12of ObjectManager in these messages and follow up with a method call
13on the interface, which isn't actually implemented on the objects
14within the subtree, below the manager.
15---
16 src/libsystemd/sd-bus/bus-objects.c | 10 ----------
17 1 file changed, 10 deletions(-)
18
19diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c
20index 6e00255b2..59f698402 100644
21--- a/src/libsystemd/sd-bus/bus-objects.c
22+++ b/src/libsystemd/sd-bus/bus-objects.c
23@@ -1076,10 +1076,6 @@ static int object_manager_serialize_path(
24 if (r < 0)
25 return r;
26
27- r = sd_bus_message_append(reply, "{sa{sv}}", "org.freedesktop.DBus.ObjectManager", 0);
28- if (r < 0)
29- return r;
30-
31 found_something = true;
32 }
33
34@@ -2302,9 +2298,6 @@ static int object_added_append_all(sd_bus *bus, sd_bus_message *m, const char *p
35 if (r < 0)
36 return r;
37 r = sd_bus_message_append(m, "{sa{sv}}", "org.freedesktop.DBus.Properties", 0);
38- if (r < 0)
39- return r;
40- r = sd_bus_message_append(m, "{sa{sv}}", "org.freedesktop.DBus.ObjectManager", 0);
41 if (r < 0)
42 return r;
43
44@@ -2473,9 +2466,6 @@ static int object_removed_append_all(sd_bus *bus, sd_bus_message *m, const char
45 if (r < 0)
46 return r;
47 r = sd_bus_message_append(m, "s", "org.freedesktop.DBus.Properties");
48- if (r < 0)
49- return r;
50- r = sd_bus_message_append(m, "s", "org.freedesktop.DBus.ObjectManager");
51 if (r < 0)
52 return r;
53
54--
552.14.3
56