diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2017-04-26 02:36:30 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-04-26 02:36:30 +0200 |
commit | c0e7906d2041dad35822a31f8e84768c264d7f6d (patch) | |
tree | 5e59e6312cf8cf60cdce09c23fb8a53d84c20e26 | |
parent | Merge pull request #5803 from ssahani/util (diff) | |
download | systemd-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.c | 16 |
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; } |