chiark / gitweb /
bus-proxyd: fix 'ListQueuedOwners' call
authorLukasz Skalski <l.skalski@samsung.com>
Fri, 6 Feb 2015 16:08:32 +0000 (17:08 +0100)
committerDaniel Mack <daniel@zonque.org>
Sat, 7 Feb 2015 09:27:45 +0000 (10:27 +0100)
Set proper kdbus_cmd_list object size, otherwise:

dbus-send --system --dest=org.freedesktop.DBus --type=method_call \
print-reply / org.freedesktop.DBus.ListQueuedOwners string:org.freedesktop.systemd1

Error org.freedesktop.DBus.Error.InvalidArgs: Invalid argument

src/bus-proxyd/driver.c

index 23911c6a3c844b6db4bd57c88b71222f7107687a..b27583959cfe289a4178a85294df84f94bb0eb55 100644 (file)
@@ -350,6 +350,7 @@ int bus_proxy_process_driver(sd_bus *a, sd_bus *b, sd_bus_message *m, SharedPoli
                         return synthetic_reply_method_errno(m, r, NULL);
 
                 cmd.flags = KDBUS_LIST_QUEUED;
+                cmd.size = sizeof(cmd);
                 r = ioctl(a->input_fd, KDBUS_CMD_LIST, &cmd);
                 if (r < 0)
                         return synthetic_reply_method_errno(m, -errno, NULL);