summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/bus-objects.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2015-07-09 13:27:57 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2015-07-09 13:30:16 +0200
commit92d16a53e385781a55d9231d9f8f89c1747ab0e4 (patch)
treea303674fb19ba1bc5bc6a6fe580e4f521762c4e4 /src/libsystemd/sd-bus/bus-objects.c
parenta0f7095171f03517bb44f91c67098ddd53537b54 (diff)
sd-bus: include queried path in GetManagedObjects
If GetManagedObjects is called on /foo/bar, then it should also include the object /foo/bar, if it exists. Right now, we only include objects underneath /foo/bar/. This follows the behavior of existing dbus implementations. Obsoletes #527 and fixes #525. Reported by: Nathaniel McCallum
Diffstat (limited to 'src/libsystemd/sd-bus/bus-objects.c')
-rw-r--r--src/libsystemd/sd-bus/bus-objects.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c
index 2eaa7de306..b3cc28ee9b 100644
--- a/src/libsystemd/sd-bus/bus-objects.c
+++ b/src/libsystemd/sd-bus/bus-objects.c
@@ -1164,6 +1164,10 @@ static int process_get_managed_objects(
if (bus->nodes_modified)
return 0;
+ r = set_put_strdup(s, m->path);
+ if (r < 0)
+ return r;
+
r = sd_bus_message_new_method_return(m, &reply);
if (r < 0)
return r;