Using DBus Daemon with TCP and ANONYMOUS authorization

Schmottlach, Glenn GSchmott at
Mon Nov 17 08:02:29 PST 2008

Apparently, while following the code in the debugger, if the daemon
can't read the SCM_CREDS information, it's considered a catastrophic
error and the connection is subsequently dropped like a rock.

      if (_dbus_read_credentials_socket (socket_transport->fd,
          transport->receive_credentials_pending = FALSE;
          _dbus_verbose ("Failed to read credentials %s\n",
          dbus_error_free (&error);
          do_io_error (transport);

The do_io_error() routine appears to actually close the
transport/socket. So it would appear the ANONYMOUS option never gets a
chance to be tried. I'll try digging around dbus-auth.c but it appears
the ANONYMOUS authentication mechanism might be broken at this point.
Please correct me if I'm wrong.

-----Original Message-----
From: dbus-bounces at
[mailto:dbus-bounces at] On Behalf Of Havoc
Sent: Monday, November 17, 2008 10:53 AM
To: Schmottlach, Glenn
Cc: dbus at
Subject: Re: Using DBus Daemon with TCP and ANONYMOUS authorization


On Mon, Nov 17, 2008 at 10:41 AM, Schmottlach, Glenn
<GSchmott at> wrote:
> I removed the "EXTERNAL" authentication tag from the session.conf file
> (with only "ANONYMOUS" remaining). Unfortunately, this doesn't appear
> have any effect. Here's the stack trace:
> 11 _dbus_read_credentials_socket() ..\..\dbus\dbus-sysdeps-unix.c:1140
> 0x080816dc

It may just always read the credentials, but then not use them. Does
this actually cause a problem? If things don't work, are you sure it
isn't some other problem?

> Can you suggest where I might set a breakpoint to see whether or not
> ANONYMOUS authentication is being tried? Where does it loop through
> configured mechanisms looking for one that works?

Somewhere in dbus-auth.c iirc, though I haven't looked in a couple of
years. It should be pretty simple to find.

dbus mailing list
dbus at

More information about the dbus mailing list