Abstract namespace connections (Connection refused)

Havoc Pennington hp at pobox.com
Thu Feb 14 13:56:50 PST 2008


Hi,

On Thu, Feb 14, 2008 at 4:33 PM, @4u <fd4u at vplace.de> wrote:
>  I thought it's enough to connect to a real or abstract socket via its
>  path. If I try to connect to an FAM socket in the abstract namespace, it
>  works. Unfortunately I get "Connection refused" if I try to open a user
>  session in /tmp/. What's special with the user session sockets? The
>  process trying to connect has the same uid and pid as the owner of the
>  socket - so this can't be the reason, right?

There aren't any permissions (plus in the abstract namespace, the use
of /tmp in the name is just misleading; it doesn't matter whether the
name looks like a filesystem path, it's just a string).

Most likely you are passing the wrong length to the socket functions.
The abstract name is allowed to have nul bytes in it. So if you say
the length is 255, 255 bytes are used, even if you have a nul after
/tmp/whatever.

Havoc


More information about the dbus mailing list