d-bus head

Havoc Pennington hp@redhat.com
Thu, 30 Oct 2003 22:56:28 -0500


On Thu, 2003-10-30 at 22:35, Joe Shaw wrote:
> We'll run into problems with other OSes like Solaris which also don't
> have it.  The credential passing stuff is all very non-portable across
> Unix right now.

Come on, this stuff is in ancient UNIX; it's in the Stevens book.
There's a more concise way to do it on Linux but dbus-sysdeps.c does it
the old verbose way too (in fact I could have sworn you implemented it!
wait:

2003-03-01  Joe Shaw  <joe@assbarn.com>
 
        * configure.in: Check for "struct cmsgcred" and try to access
its
        members for BSD-like unices.
 
        * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back
into
        _dbus_read_credentials_unix_socket().
        (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
        read() for reading the credential byte off the unix socket.  Use
        struct cmsgcred on systems that support it.
 

Havoc