summaryrefslogtreecommitdiffstats
path: root/src/libsystemd/sd-bus/bus-objects.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2017-04-26 02:36:30 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-26 02:36:30 +0200
commitc0e7906d2041dad35822a31f8e84768c264d7f6d (patch)
tree5e59e6312cf8cf60cdce09c23fb8a53d84c20e26 /src/libsystemd/sd-bus/bus-objects.c
parentMerge pull request #5803 from ssahani/util (diff)
downloadsystemd-c0e7906d2041dad35822a31f8e84768c264d7f6d.tar.xz
systemd-c0e7906d2041dad35822a31f8e84768c264d7f6d.zip
bus: report builtins in GetManagedObjects() (#5799)
We already report builtin interfaces with InterfacesAdded and InterfacesRemoved. However, we never reported them in GetManagedObjects(). This might end up confusing callers that want to use those interfaces (or simply rely on the interface count to be coherent). Report the builtins for all objects that are queried.
Diffstat (limited to '')
-rw-r--r--src/libsystemd/sd-bus/bus-objects.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c
index 9bd07ffcab..b6f5afe1b3 100644
--- a/src/libsystemd/sd-bus/bus-objects.c
+++ b/src/libsystemd/sd-bus/bus-objects.c
@@ -1057,6 +1057,22 @@ static int object_manager_serialize_path(
if (r < 0)
return r;
+ r = sd_bus_message_append(reply, "{sa{sv}}", "org.freedesktop.DBus.Peer", 0);
+ if (r < 0)
+ return r;
+
+ r = sd_bus_message_append(reply, "{sa{sv}}", "org.freedesktop.DBus.Introspectable", 0);
+ if (r < 0)
+ return r;
+
+ r = sd_bus_message_append(reply, "{sa{sv}}", "org.freedesktop.DBus.Properties", 0);
+ if (r < 0)
+ return r;
+
+ r = sd_bus_message_append(reply, "{sa{sv}}", "org.freedesktop.DBus.ObjectManager", 0);
+ if (r < 0)
+ return r;
+
found_something = true;
}