Skype and DBus: should my client library act as a server?
zeuthen at gmail.com
Mon Mar 23 14:24:58 PDT 2015
On Mon, Mar 23, 2015 at 4:59 PM, Thiago Macieira <thiago at kde.org> wrote:
> On Monday 23 March 2015 15:07:06 David Zeuthen wrote:
> > Hi,
> > On Wed, Mar 18, 2015 at 5:35 PM, Thiago Macieira <thiago at kde.org> wrote:
> > > Reality is that it's actually easier to write your own socket and
> > > marshalling
> > > code.
> > True that but don't forget the authentication code (EXTERNAL, etc.)! I
> > think it was the most challenging part to get right (and to test) when I
> > wrote GDBus. The ironic thing is that we don't really need any of it
> (and I
> > think kdbus does largely away with it) since 99% of the time we're using
> > Unix domain sockets + peer credentials...
> That's actually surprising. The exchange is very simple, so it shouldn't
> taken you so long.
I don't remember it being that simple, there's at least a couple of back
and forths (including negotiating capabilities, right now only Unix File
Descriptor passing but this can grow) plus you need to abstract out what
credentials are and what they mean (it's different across Unix-like systems
even) since Applications need to check them to reject/accept incoming
connections. Plus you also want libdbus-1 interop unit tests to know that
your code works with the reference implementation...
> Were you trying to implement the full state machine and SASL integration?
Yeah, pretty much - it's written in a way so Applications (or libraries or
desktop environments) would be able to extend a GDBusAuthMechnism abstract
base class. Plus I wrote implementations for ANONYMOUS, EXTERNAL and
DBUS_COOKIE_SHA1. Fortunately this API was never exposed to applications
... which in retrospect was probably one of my better ideas :-)
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Software Architect - Intel Open Source Technology Center
> PGP/GPG: 0x6EF45358; fingerprint:
> E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dbus