On 05/11/2015 05:58 PM, Jakub Hrozek wrote:
Thanks for the patches. They work quite well!
One bug I found is that if you query a nonexistant object path with
GetAll, then all subsequent queries block. Maybe we don't finish some
request on error? This is what I tried:
[jhrozek@client] sssd $ [(review)] dbus-send --print-reply --system
--dest=org.freedesktop.sssd.infopipe
/org/freedesktop/sssd/infopipe/Users/redhat_2ecom/10327
org.freedesktop.DBus.Properties.GetAll string:org.freedesktop.sssd.infopipe.Users.User
Error org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by
message bus)
[jhrozek@client] sssd $ [(review)] dbus-send --print-reply --system
--dest=org.freedesktop.sssd.infopipe
/org/freedesktop/sssd/infopipe/Users/linux_2etest/465400000
org.freedesktop.DBus.Properties.GetAll string:org.freedesktop.sssd.infopipe.Users.User
Error org.freedesktop.DBus.Error.TimedOut: Activation of org.freedesktop.sssd.infopipe
timed out
The first objectpath is a copy-n-paste error from a different machine,
the second is legitimate. All works well unless I use the nonexistant path.
Container wasn't closed properly and it broke the bus.
diff --git a/src/sbus/sssd_dbus_invokers.c b/src/sbus/sssd_dbus_invokers.c
index b2f0de0..f4d4ba3 100644
--- a/src/sbus/sssd_dbus_invokers.c
+++ b/src/sbus/sssd_dbus_invokers.c
@@ -336,6 +336,12 @@ int sbus_invoke_get_aDOsasDE(DBusMessageIter *iter,
/* iterate over keys */
if (table == NULL) {
+ dbret = dbus_message_iter_close_container(iter, &it_array);
+ if (!dbret) {
+ ret = EIO;
+ goto done;
+ }
+
ret = EOK;
goto done;
}
New patches are attached.