Credentials-passing nul byte missing

David Zeuthen zeuthen at gmail.com
Tue Jun 21 09:28:02 PDT 2011


Hi,

On Tue, Jun 21, 2011 at 11:59 AM, Simon McVittie
<simon.mcvittie at collabora.co.uk> wrote:
> On Tue, 21 Jun 2011 at 22:59:42 +0800, jerome zh wrote:
>> I am now using DBUS (have been ported to eCos) under TCP mode.
> ...
>> I got the reason by capturing packets over the wire. And I found the failure
>> was caused by NO credentials-passing nul byte was send right after the tcp
>> connection established.
>
> In the reference implementation, _dbus_send_credentials_socket() sends the
> nul byte and _dbus_read_credentials_socket() receives it; both are implemented
> in dbus/dbus-sysdeps-PLATFORM.c (where PLATFORM is unix or win, as
> appropriate).

I can confirm this - the GLib implementation does the same (for any
transport) and also interoperates just fine with the reference
implementation (I've tested both Unix, tcp and nonce-tcp transports).
The NUL byte is part of the protocol so if an implementation doesn't
send it, it's a bug in the implementation.

    David


More information about the dbus mailing list