chiark / gitweb /
bus-proxyd: fix EPERM on replies
authorDavid Herrmann <dh.herrmann@gmail.com>
Thu, 8 Jan 2015 20:06:14 +0000 (21:06 +0100)
committerDavid Herrmann <dh.herrmann@gmail.com>
Thu, 8 Jan 2015 20:06:14 +0000 (21:06 +0100)
Imagine a kdbus peer sending a method-call without EXPECT_REPLY set
through the proxy to a dbus1 peer. The proxy turns the missing
EXPECT_REPLY flag into a dbus1 NO_REPLY_EXPECTED flag. However, if the
receipient ignores that flag (valid dbus1 behavior) and sends a reply, the
proxy will try to forward it to the original peer. This will fail with
EPERM as the kernel didn't track the reply.

We have two options now: Either we ignore EPERM for reply messages, or we
track reply-windows in the proxy so we can properly ignore replies if
EXPECT_REPLY wasn't set.

This commit chose the first option: ignore EPERM for replies. The only
down-side is that replies without matching method call will no longer be
forwarded by the proxy. This works on dbus1, though.
Nobody sane does this, so lets ignore it.


No differences found